Reputation: 8150
D3.js axes typically have "handlebars" on the end of each axis, like this:
Those look nice. But.
How can these be removed to make an axis look flat, like this:
Upvotes: 3
Views: 364
Reputation: 7687
The square ends of the path are sized using either the .tickSize
method, in which case the second argument gives the outer tick size and the first the main tick size, or else using the .outerTickSize
method. In either case, supply a value of 0 to suppress the ticks.
ticks.tickSize(innerTickHeight, 0);
or
ticks.outerTickSize(0);
Upvotes: 7