Browse Source

Fix ygrid

pull/1/head
Masayuki Tanaka 12 years ago committed by masayuki
parent
commit
7e02bab53f
  1. 15
      c3.js

15
c3.js

@ -614,16 +614,7 @@
// Y-Grid // Y-Grid
if (__grid_y_show) { if (__grid_y_show) {
grid.append('g') grid.append('g').attr('class', 'ygrids')
.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)
} }
if (__grid_y_lines) { if (__grid_y_lines) {
grid.append('g') grid.append('g')
@ -905,7 +896,7 @@
if (__legend_show) drawLegend(targets) if (__legend_show) drawLegend(targets)
// Update main chart with settings // Update main chart with settings
update() update(false, true)
// Draw chart for each data // Draw chart for each data
draw(targets) draw(targets)
@ -918,6 +909,8 @@
var barX, barY, barW, barH var barX, barY, barW, barH
var rectWidth var rectWidth
withY = (typeof withY === 'undefined') ? false : withY
x.domain(brush.empty() ? x2.domain() : brush.extent()) x.domain(brush.empty() ? x2.domain() : brush.extent())
// ticks for x-axis // ticks for x-axis

Loading…
Cancel
Save