From 7e02bab53f4a388f36fbfaf1e31b394259bcdcb2 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Fri, 10 May 2013 14:36:39 +0900 Subject: [PATCH] Fix ygrid --- c3.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/c3.js b/c3.js index 3e65481..804100e 100644 --- a/c3.js +++ b/c3.js @@ -614,16 +614,7 @@ // Y-Grid if (__grid_y_show) { - grid.append('g') - .attr('class', 'ygrids') - .selectAll(".ygrid") - .data(y.ticks(10)) - .enter().append("line") - .attr("class", "ygrid") - .attr("x1", 0) - .attr("x2", width) - .attr("y1", y) - .attr("y2", y) + grid.append('g').attr('class', 'ygrids') } if (__grid_y_lines) { grid.append('g') @@ -905,7 +896,7 @@ if (__legend_show) drawLegend(targets) // Update main chart with settings - update() + update(false, true) // Draw chart for each data draw(targets) @@ -918,6 +909,8 @@ var barX, barY, barW, barH var rectWidth + withY = (typeof withY === 'undefined') ? false : withY + x.domain(brush.empty() ? x2.domain() : brush.extent()) // ticks for x-axis