2014-01-28 44 views
0

我需要創建紅色和綠色區域連同系列。 http://esbolsa.com/blog/wp-content/uploads/2012/12/Commodity-Channel-Index-Fortaleza.png我如何創建與highcharts閾值圖

我正在使用下面的代碼,它適用於顯示紅色(低於-100)。如何指定另一個閾值(+100)?

chart.addSeries({ 
      name: name + "_series", 
      id: name + "_series", 
      type: 'area', 
      data: cciData, 
      yAxis: name + '_axis', 
      showInLegend: false, 
      color: '#2f7ed8', 
      negativeColor:'red', 
      threshold:-100 
     },false); 

回答

0

很抱歉,在Highcharts,您只能設置單個閾值,但您可以使用額外的serie,即綠色區域。

1

我所看到的唯一的辦法是創建2系列是除了thresholdsnegativeColor相同。

+0

不..這種方法不顯示中間線 – user3038576

+0

你是什麼意思「中間線」? – wergeld

+0

線在100和-100之間。這應該是隻是線.. – user3038576