javascript - Highcharts multi-color line -


i looking create highchart multi-colored line. if goes down under value, become red, , when comes on value, become green .

here picture example: gradient example

or maybe highcharts have other charts models differentiate high or low level color?

you can achieve coloring using lineargradient coloring:

color: {     lineargradient: { x1: 0, x2: 0, y1: 0, y2: 1 },     stops: [         [0, 'red'],         [0.25, 'yellow'],         [0.50, 'green'],         [0.75, 'yellow'],         [1, 'red']     ] } 

here 0 in stops relates minimum value of series , 1 maximum value, , in between percentages between values.

if find percentages according values prior creating chart use correct stops values make relate specific values in data (at least approximately).

see this jsfiddle example.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -