2
我有一个图表,有多个xAxis
和yAxis
。我想在xAxis上有多个plotLines
,但每个plotLine都不会停留在当然。这是fiddle。点击All
看我的意思。Highcharts plotLines with multiple xAxis and yAxis
第一轴上的plotLine
也转到第二轴。我怎么能阻止它?
我有一个图表,有多个xAxis
和yAxis
。我想在xAxis上有多个plotLines
,但每个plotLine都不会停留在当然。这是fiddle。点击All
看我的意思。Highcharts plotLines with multiple xAxis and yAxis
第一轴上的plotLine
也转到第二轴。我怎么能阻止它?
在HighCharts issue tracker中提出了一种解决方案,其中涉及在每个yAxis
上定义相关的xAxis
。因此,在特定的xAxis
上定义的情节线将使用相关yAxis
的顶部和高度仅在正确的区域绘制情节线。
yAxis: [{
title: {
text: 'OHLC'
},
height: 200,
lineWidth: 2,
xAxis: 0,
}, {
title: {
text: 'Volume'
},
top: 300,
height: 100,
offset: 0,
lineWidth: 2,
xAxis: 1,
}, {
title: {
text: 'Other data panel'
},
top: 300,
height: 100,
offset: 0,
lineWidth: 2,
opposite: true,
xAxis: 1,
}]
Updated Fiddle每个情节只在其相应的窗格上。
请注意,定义相关轴的功能在API中似乎没有记录。
哇,这很疯狂。很高兴知道! –