How to do wordwrap for chart labels using d3.js

后端 未结 5 439
灰色年华
灰色年华 2020-12-15 23:41

I am trying to implement the horizontal bar chart using d3.js.Some of the chart labels are too long. How to do word wrap for the chart labels on y aixs?

Source code:

5条回答
  •  囚心锁ツ
    2020-12-16 00:04

    I was looking for solutions to this problem, and found that Mike Bostock has published a working example using D3. The example is shown to work for the x-axis, but can easily be adapted for the y-axis.

提交回复
热议问题