I have a d3 (version 3.5) multi-line chart, and I'm trying to have 5 ticks on the y-axis.
This is the code for the y-axis generation, with the number of ticks:
The problem is that any ticks value I put, between 3 to 6, gives the same following result (which has fewer ticks than what I want):
And when I put a value of 7 ticks, it gives the following result (which is too many ticks than what I want):
How do I force the chart to have an exact number of ticks on the y-axis?
Thanks.