score:5

Accepted answer

I am not sure I fully understand your question, if you want to remove the ending x-axis ticks, you should set

d3js V3

.outerTickSize(0),

d3js V4 - V6

tickSizeOuter(0)

If you want to customize the ending ticks, you may use

.tickValues(y.ticks(5).concat( y.domain() ));

Have a look at my JSFiddle for a demonstration.


Related Query

More Query from same tag