Samiul Alam
Samiul Alam

Reputation: 2434

How to colorize highcharts above threshold value?

enter image description here

How can I colorize an area chart above a threshold value along the y-axis with highcharts just like in the figure? I am sure about its chart type also. Is it the area chart?

Upvotes: 0

Views: 152

Answers (1)

ppotaczek
ppotaczek

Reputation: 39079

You can use area series type with zones, for example:

series: [{
    data: [...],
    type: 'area',
    zones: [{
        value: 5,
        color: 'green'
    }, {
        color: 'red'
    }]
}]

Live demo: http://jsfiddle.net/BlackLabel/u1pg9qdj/

API Reference: https://api.highcharts.com/highcharts/series.area.zones

Upvotes: 1

Related Questions