I'm trying to use Highcharts
new solidgauge
plugin.
source code as provided by highchart
The gauge accepts three STEP parameters to show different color based on the Data. The problem is that it displays color in gradient and I wanted
1) Green color upto say 20%
2) yellow upto 80% and
3) once value crosses 80% gauge color should be Red.
Is it possible?
You can set stops, like this: http://jsfiddle.net/4zVU8/5/
So aright after color ends set new color.
To get a solid color, set the
minColor
andmaxColor
options to the same value. To set the color based on a value, just compare in the options:EDITS FOR COMMENT
Well, doing it dynamically according to the API should be as easy as:
But, this breaks the chart (and I believe it to be a bug in the library).
So the best I can come up with is to go after the internals directly:
Here's a fiddle demo.