Search code examples
highchartsarea

how can i create threshold chart with highcharts


i need to create red and green area along with line series. http://esbolsa.com/blog/wp-content/uploads/2012/12/Commodity-Channel-Index-Fortaleza.png

i am using following code, which works fine for showing red(below -100).how can i specify another threshold(+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);

Solution

  • Unfortunately in Highcharts you can set only single threshold, but you can use additional serie i.e with green areas.