Dojo + Highcharts。当执行setCategories()时,X轴未被对齐 [英] Dojo + Highcharts. The X Axis is not alligned when setCategories() is executed
问题描述
我正在使用Dojo和Highcharts,当我使用X轴时,X轴不被调整:
I am using Dojo and Highcharts, the X axis is not alligned when I use:
....xAxis[0].setCategories(...)
在小提琴中,如果您发表评论第一个setCategories,你耻辱了第二个,X轴是对齐的,但是图表no。而且如果你们两个人都dis了,你们都有这两个问题。
In the fiddle, if you comment the first setCategories and you discomment the second one, the X axis is allign, but the chart no. And if you discomment the both of them, you have the both problems.
我该如何解决这个问题?感谢提前。
How can I solve this problem? Thanks in advance.
推荐答案
我不知道为什么问题出现,但您可以通过强制x-轴偏移像这样:
I'm not sure why the problem is occurring, but you can fix it by forcing the x-axis offset like this:
xAxis : {
offset:0
},
我不认为你应该这样做。也许这是使用dojo的问题?
I don't think that you should have to do this. Maybe it's a problem related to using dojo ?
这篇关于Dojo + Highcharts。当执行setCategories()时,X轴未被对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!