How Do I Dynamically Update The Range Inside A Gauge (highcharts)?
Question1 I want to change the range inside the gauge, ie currently it is hardcoded as 0-200. But what if my value goes above 200, something like 300, then it should automatically
Solution 1:
Question 1:
Min/max values needs to be number, not percent value. In case when you would like to modify range, dynamically, you can use update
function, called on axis.
See example: http://jsfiddle.net/jgRTz/http://api.highcharts.com/highcharts#Axis.update()
Question 2: In understand that you woudl liek to set limit (adding point not shift chart), but after do it like here:
setInterval(function() {
var x = (newDate()).getTime(), // current time
y = Math.random();
if(series.data.length > MAXPOINTS)
series.addPoint([x, y], true, true);
else
series.addPoint([x, y], true, false);
}, 1000);
Post a Comment for "How Do I Dynamically Update The Range Inside A Gauge (highcharts)?"