score:3

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:

series.addpoint([x, y], true, true);

to:

series.addpoint([x, y], true);

demo

reference

score:6

change your load function so that the shift parameter doesn't apply before you've added your 20 values, see this jsfiddle

load: function() {

    // set up the updating of the chart each second
    var series = this.series[0],
        maxsamples = 20,
        count = 0;
    setinterval(function() {
        var x = (new date()).gettime(), // current time
            y = math.random();
        series.addpoint(
            [x,y]
            , true
            , (++count >= maxsamples)
        );
    }, 1000);
}

Related Query

More Query from same tag