Commit f34fb193 authored by Christian Kalmar's avatar Christian Kalmar

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

parent 1d8184cf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment