Rahul Desai
Rahul Desai

Reputation: 15501

Adjust gap in between x-axis and label

In my D3 chart, I changed the tickSize to 0. As a result the gap between the axis and the label is almost nil. How do I adjust this gap so as to look decent?

D3 x-axis code:

var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom")
.tickSize(0,0);

jsFiddle

Upvotes: 0

Views: 204

Answers (1)

Unknown User
Unknown User

Reputation: 3668

Increased the tick size.

And targeted the element using this .tick line and used the css property display: none;.

Fiddle

Upvotes: 1

Related Questions