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中似乎沒有記錄。
哇,這很瘋狂。很高興知道! –