2016-02-12 162 views

回答

3

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中似乎沒有記錄。

+1

哇,這很瘋狂。很高興知道! –