0

I have an issue with spline chart update with every second. Chart redraw every time so it is not showing constant wave.

Here is image how it looks

enter image description here

I have tried like this

this.timeinterval = setInterval(() => {
    const x = (new Date()).getTime() + 7200000; // current time
    if (this.voltage) {
      this.chart['series'][0].addPoint([x, this.voltage], true, true);
    }
  }, 250);

How can i fix it to go smoothly.

U rock
  • 717
  • 2
  • 13
  • 32
  • Your code suggests the chart updates every 250 milliseconds, I don't think that is enough time for the chart to finish drawing before it gets a new point, which might be the issue. Try looking in the performance tab in console, to see what is going on in more detail. – ewolden Jun 22 '18 at 10:37
  • I have changed to 1000 ms but the result is same. I am using same chart in ionic 3 mobile application there it is working fine. – U rock Jun 22 '18 at 10:40
  • Sorry i am checking conditional in my template that gets value every time that is why it takes some time to render graph. Thank you @ewolden – U rock Jun 22 '18 at 10:48

0 Answers0