Commit 24c1ad13 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Merge pull request #473 from chriskalmar/dynamic-tickvalues

Dynamic tickValues
parents 1d8184cf 80c3c29a
...@@ -5558,8 +5558,15 @@ ...@@ -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;
......
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