Reputation: 28556
How to set tick max value that will be generated (visible) on an axis ? I have multi-line chart with multiple y axis. One of line chart has max value in half of axis y. How to prevent generating ticks above this max value ? Now i'm using .tickValues(domain);
, but this generate only min and max.
Upvotes: 1
Views: 2781
Reputation: 6192
Assuming domain
is an array of the min and max values this is expected. Try something like
.tickValues(d3.range(domain[0], domain[1]+1))
Here is a jsfiddle to play with
Upvotes: 3