如何在DOJO图表中处理重叠的X轴标签? [英] How to deal with overlapping X-axis labels in DOJO chart?

查看:123
本文介绍了如何在DOJO图表中处理重叠的X轴标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用dojo库,而且目前我的x轴标签有一些格式化问题。一些标签有更长的名称,因此有一些重叠。有一些方法可以让标签自动进行自己的放置,或者长时间的标签出现在其他标签之下,以便它们与其他标签不重叠。

I have recently starting using the dojo library, and I am currently having some formatting problems with my x-axis labels. A few of the labels have longer names, and thus there is some overlap going on. Is there some way to have the labels automatically space themselves, or for longer labels to appear below the others so that they do not overlap the other labels?

我已经尝试使用旋转属性,bu我不满意的结果。虽然它确实防止了重叠,但它也大大减少了实际图表占用的面积。

I have tried using the rotation property, bu I was not satisfied with the result. While it did prevent overlapping, it also significantly reduced the area taken up by the actual chart.

推荐答案

您还可以旋转标签但是使用旋转属性。

You can also rotate the labels but using the "rotation" attribute.

例如

YourChartDefinition.addAxis("x", 
                            {vertical   : false,
                             minorTicks : true,
                             includeZero: false,
                             font: "normal normal bold 8pt Arial",
                             rotation: -30,
                             labels: labels_for_axis
                            }      
                           );

这篇关于如何在DOJO图表中处理重叠的X轴标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆