3

How we align the long xAxis labels in zig zag manner? (Don't use rotateLabels), Or Is there any possibility to text wrap for those long xAxis labels in nvd3 charts?

Please find attached images for reference...

Actual Image with - Issue

enter image description here

Expected Result - 1

enter image description here

Expected Result - 2

enter image description here

Thanks in advance...

4

1 回答 1

5

对于预期结果 1: 您可以添加以下选项:.staggerLabels(true)如您在此处看到的。

对于预期结果 2: 在图表中使用它之前,您必须通过用新行替换空格来手动对数据执行此操作。如果您正在处理数字,您还可以查看d3 字符串格式。

于 2013-04-24T16:15:24.240 回答