How to set width to x-axis label?

做~自己de王妃 提交于 2019-12-25 07:07:05

问题


If the x-axis label is long, it is getting overlapper on the next label like this. How do I set a width to it so that it appears as in the snapshot below?

x-axis code:

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

jsFiddle


回答1:


I couldn't do the exact thing what's there in the image.

But i found this from this link.

Wrapping the x axis labels using a custom function.

Hope this helps. :)



来源:https://stackoverflow.com/questions/21874959/how-to-set-width-to-x-axis-label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!