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. 7
      c3.js

7
c3.js

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

Loading…
Cancel
Save