2012-04-30 3 views
0

xAxisの次のplotLineオブジェクトが両方のペインにラインを追加しています このコードで最初のペインに行を追加するにはどうすればよいですか?ここplotBandsへのペイン とも同じこと おかげ2つのハイストックペインのいずれかにプロットラインを追加する

の残りの部分に影響を与えることなく、コード

  xAxis: { 

       plotLines: [{ 
       value: 1180656000000, 
        color: 'green', 
        dashStyle: 'shortdash', 
        width: 2, 
        label: { 
         text: 'prerinse' 
        } 
       }, { 
        value: 1256227606000, 
        color: 'red', 
        dashStyle: 'shortdash', 
        width: 2, 
        label: { 
         text: 'postrinse' 
        } 
       }] 

       }, 




        yAxis: [{ 
         title: { 
          text: 'OHLC', 
         }, 

         height: 200, 
         lineWidth: 2 
        }, { 
         title: { 
          text: 'Volume' 
         }, 
         top: 300, 
         height: 100, 
         plotLines: [{value:500}], 
         offset: 0, 
         lineWidth: 2 
        }], 

         series: [{ 
          type: 'candlestick', 
          name: 'AAPL', 
          data: ohlc, 
          dataGrouping: { 
           units: groupingUnits 
          } 
         }, { 
          type: 'column', 
          name: 'Volume', 
          data: volume, 
          yAxis: 1, 
          dataGrouping: { 
           units: groupingUnits 
          } 
+0

あなたの質問は...ですか? – dgw

+0

xAxis上のplotLineは、1つのペインノットだけに影響を与える必要があります –

答えて

0
series: [{ 
type: 'candlestick', 
name: 'AAPL', 
data: ohlc, 
dataGrouping: { 
units: groupingUnits 
} 
}, 
{ 
type: 'column', 
name: 'newline', 
data: newdata, 
yAxis: 1, <-This 
dataGrouping: { 
units: groupingUnits 
}, 

{ 
type: 'column', 
name: 'Volume', 
data: volume, 
yAxis: 1, 
dataGrouping: { 
units: groupingUnits 
} 

はこれをy軸に2つ目のペインが追加されています。コード内の尖った線を "xAxis:0"に変更すると、新しいペインがx軸に追加されます。

関連する問題