score:1

Accepted answer

you can use the ticks(number) method on the axis to tell it to draw fewer ticks; the default is to draw approximately 10 ticks. the actual number of ticks is adjusted to get round-number intervals between tick values, which is why you were getting 12 ticks using the default behaviour.

for your case you want to use

y.axis = d3.svg.axis().ticks(6).scale(y).orient("left")

Related Query