Highcharts Area graph, use 2 fill colors above / below X axis

Posted by Kris Chant on Stack Overflow See other posts from Stack Overflow or by Kris Chant
Published on 2012-09-12T00:56:50Z Indexed on 2012/09/17 3:38 UTC
Read the original article Hit count: 497

Filed under:
|

In Highcharts, I'd like to fill an Area graph with 2 colors, positive values get one color, negative values get another color. I've been able to do this with a linearGradient, but this must be adjusted based upon the size of the container.

Is there a more general way of doing this, e.g. setting values > 0 color 1, values < 0 color 2?

See my JSFiddle for more information and an example: http://jsfiddle.net/GNvur/2/

© Stack Overflow or respective owner

Related posts about colors

Related posts about highcharts