score:1

Accepted answer

Each series can have only one pointInterval defined.

There're 2 easiest solutions for this problem on the top of my head:

1. Add another linked series for new values linkedTo:previous will cause that legend switch will work for both series. Change the colour of the second series so that it looks exactly the same as the first one. Set pointStart using the last value from the base series:

  events: {
    load: function() {
      var points = this.series[0].points,
        lastPoint = points[points.length - 1];

      this.series[1].update({
        pointStart: lastPoint.x,
        color: this.series[0].color
      });
    }
  }

(...)

series: [{
  name: 'SeriesName',
  data: data1
}, {
  name: 'SeriesName', // same name as the previous series
  pointInterval: secondsIntervalAjax * 10000, // 10 times bigger to see results faster
  linkedTo: ':previous',
  marker: {
    enabled: false
  }
}]

Live demo: http://jsfiddle.net/kkulig/gtsw8t3q/

2. Compute and explicitly assign x value to every point

No pointInterval and pointStart required in this case.


Related Query

More Query from same tag