多个Y轴 - 余量 [英] multiple Y axis - margin
本文介绍了多个Y轴 - 余量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的图表上有多个Y轴,他们没有标题。我无法找到允许我在轴之间添加一点空间的属性。可能吗 ?这是我现在拥有的。正如你可以看到它看起来非常压扁。
解决方案
您可以使用 offset
属性。
$ b 示例:
yAxis:[{
offset:0,
lineColor:Highcharts.getOptions()。colors [0] ,
title:{text:0}
},{
offset:50,
lineColor:Highcharts.getOptions()。colors [1],
title: {text:0}
},{
offset:100,
lineColor:Highcharts.getOptions()。colors [2],
title:{text:0}
(图表保证金也可能需要根据您的设置进行调整)
小提琴:
I have multiple Y axis on my chart, they have no titles. I cannot find a property that would allow me to add a bit of space between the axis. Is it possible ? This is what I have now. As you can see it looks very squashed.
解决方案 You can use the offset
property.
Example:
yAxis: [{
offset: 0,
lineColor: Highcharts.getOptions().colors[0],
title: { text: 0 }
},{
offset: 50,
lineColor: Highcharts.getOptions().colors[1],
title: { text: 0 }
},{
offset: 100,
lineColor: Highcharts.getOptions().colors[2],
title: { text: 0 }
}]
(chart margin may also need to be adjusted to suit, depending on your set up)
Fiddle:
Reference:
这篇关于多个Y轴 - 余量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文