how I can the yAxis Stops values adjust so that the shows me different colors depending on the temperature value?
The best would be as follows:
-30 to 0 = blue
0 to 12 = light blue
12 to 25 = green
25 to 30 = orange
30 to 60 = red
Here my Code:
$(function () {
var gaugeOptions = {
chart: {type: 'solidgauge'},
title: null,
pane: {
size: '90%',
startAngle: -180,
endAngle: 90,
background: {
backgroundColor: '#EEE',
innerRadius: '95%',
outerRadius: '100%',
shape: 'arc'
}
},
tooltip: {enabled: false},
// the value axis
yAxis: {
stops: [
[0.1, '#00f'],
[0.2, '#0f0'],
[0.3, '#f00']
],
lineWidth: 0,
minorTickInterval: 0,
tickPixelInterval: 50,
tickWidth: 1,
labels: {
enabled: true,
distance: 10
}
},
plotOptions: {
solidgauge: {
innerRadius: '95%',
dataLabels: {
y: 5,
borderWidth: 0,
useHTML: true
}
}
}
};
$('#temp001').highcharts(Highcharts.merge(gaugeOptions, {
yAxis: {
min: -30,
max: 60
},
credits: {
enabled: false
},
series: [{
name: 'inTemp',
data: [-15.5], /////// Temp Value //////////
dataLabels: {
format: '<div style="text-align:center"><span style="font-size:25px;color:' +((Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black') + '">{y} °C</span><br/>' + '<span style="font-size:12px;color:silver">abcde</span></div>'
}
}]
}));
});
Sorry for my Bad English....German ist better