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