If you open this JSFiddle with the dynamic spline update it loads the series with 20 points before it starts updating every second.
I don't want to display any initial data and let the interval add the points as they come in.
So I change:
series: [{
name: 'Random data',
data: (function() {
// generate an array of random data
var data = [],
time = (new Date()).getTime(),
i;
for (i = -19; i <= 0; i++) {
data.push({
x: time + i * 1000,
y: Math.random()
});
}
return data;
})()
}]
to
series: [{
name: 'Random data',
data: []
}]
But it doesnt add the points. Is there something I am missing?
The third parameter of
addPoint
is set if you what to shift a point after add this one.So, what is happening ? You're adding a point and then removing it.
Change:
To:
Demo
Reference
Change your load function so that the shift parameter doesn't apply before you've added your 20 values, see this jsfiddle