Browse Source

Set __grid_y_ticks as option

pull/55/head
David van Leeuwen 11 years ago
parent
commit
8656eface3
  1. 5
      c3.js
  2. 4
      c3.min.js

5
c3.js

@ -115,7 +115,8 @@
__grid_y_show = getConfig(['grid', 'y', 'show'], false),
// not used
// __grid_y_type = getConfig(['grid', 'y', 'type'], 'tick'),
__grid_y_lines = getConfig(['grid', 'y', 'lines'], null);
__grid_y_lines = getConfig(['grid', 'y', 'lines'], null),
__grid_y_ticks = getConfig(['grid', 'y', 'ticks'], 10);
// point - point of each data
var __point_show = getConfig(['point', 'show'], true),
@ -2260,7 +2261,7 @@
// Y-Grid
if (withY && __grid_y_show) {
ygrid = main.select('.ygrids').selectAll(".ygrid")
.data(y.ticks(__grid_y_lines));
.data(y.ticks(__grid_y_ticks));
ygrid.enter().append('line')
.attr('class', 'ygrid');
ygrid.attr("x1", __axis_rotated ? y : 0)

4
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save