Highcharts多个传奇 [英] Highcharts multiple legends
问题描述
我创建了一张Highcharts图表,其中有多个Y轴和一个X轴。
Y-Axises在不同的层面上:
.. 。
xAxis:{
type:'datetime'
},
yAxis:[{
height:230,
top:70
},{
height:230,
top:394
},
],
...
通过这种方式,我有多个图形,只有一个时间线让我可以一次缩放所有图形。请参阅 http://jsfiddle.net/jnLAu/
我想有多个传说,每个Y轴一个。有没有什么方法可以在Highcharts中创建具有多个图例的图表?
你不能有多个图例,您可以使用多种技巧使其看起来像您拥有多个图例。对于你的例子,你可以设置 itemMarginBottom:280
查看更新的小提琴: https://jsfiddle.net/jnLAu/
I've created a Highcharts chart, which has multiple Y-Axises and one X-Axis.
The Y-Axises are on different levels:
...
xAxis: {
type: 'datetime'
},
yAxis: [{
height: 230,
top: 70
}, {
height: 230,
top: 394
},
],
...
This way I have multiple graphs with just one time line which let me zoom all graphs at once. See http://jsfiddle.net/jnLAu/
I'd like to have multiple legends, one for each Y-Axis. Is there any way in Highcharts to create charts with multiple legends?
You can't have multiple legends, but there are a number of techniques you can use to make it look like you have more than one legend. For your example you can set
itemMarginBottom: 280
See updated fiddle: https://jsfiddle.net/jnLAu/
这篇关于Highcharts多个传奇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!