Browse Source

allow for tickValues to be calculated dynamically via a function by providing the current domain

pull/473/head
Christian Kalmar 10 years ago
parent
commit
f34fb193d1
  1. 11
      c3.js

11
c3.js

@ -5558,8 +5558,15 @@
return axis; return axis;
}; };
axis.tickValues = function (x) { axis.tickValues = function (x) {
if (!arguments.length) { return tickValues; } if (typeof x === 'function') {
tickValues = x; tickValues = function() {
return x(scale.domain());
}
}
else {
if (!arguments.length) { return tickValues; }
tickValues = x;
}
return axis; return axis;
}; };
return axis; return axis;

Loading…
Cancel
Save