I am trying to set solid gauge chart to use defined colors for ranges using colorAxis dataClasses, but it isn't working. Not sure what I am doing wrong.
How should I define the colorAxis and dataClasses?
Please see http://jsfiddle.net/edob/27oc38L1 UPDATE!!! I've amended fiddle to use stops, and it worked for colors defined as red, green and not for hexadecimal colors! Try values like 51, 65 and 81
$(function() {
Highcharts.chart('container-cpu', {
chart: {
type: 'solidgauge'
},
title: null,
pane: {
center: ['50%', '85%'],
size: '140%',
startAngle: -90,
endAngle: 90,
background: {
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || '#EEE',
innerRadius: '60%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {
enabled: false
},
yAxis: {
min: 0,
max: 100,
title: {
text: 'CPU'
}
},
colorAxis: {
dataClasses: [{
from: 0,
to: 50,
color: 'red'
}, {
from: 50,
to: 90,
color: 'green'
}, {
from: 90,
color: 'yellow'
}]
},
series: [{
name: 'HDD',
data: [70]
}]
});
});
I see default blue color for any value and I would expect to see green for value 70.