Browse Source

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

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

11
c3.js

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

Loading…
Cancel
Save