Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
Call addPoint hang in HighCharts

I use highcharts to show dynamical line chart, my requirement is,

  1. chart refreshes per second
  2. need to append 250 new points to chart per second
  3. keep the total number of points in chart fixed, such as keep 30 seconds, the total point is fixed as 250 * 30

I use addPoint in loop (250 times) when data generated per second, unfortunately, highcharts seems to be hang, no line showed, instead, the browse can't be clicked at all. For short loop, such as 10 times, it seems to be OK

for (var i = 0; i < 250; i++) chart.series[0].addPoint(p, true, true);

How can I refresh the line chart with delta data (250 new point) per second? I think setData is better than addPoint, but how can I append the new data list to existing data list in chart and shift the old points over 250 * 30

Thanks very much for your kindly help !

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You don't need to redraw the chart after every add point operation. It is much better to do it after the whole set:

    for (let i = 0; i < 300; i++) {
        chart.series[0].addPoint(data, false);
    }

    chart.redraw();

Live demo: http://jsfiddle.net/BlackLabel/n0x9sjz7/

API Reference: https://api.highcharts.com/class-reference/Highcharts.Series#addPoint

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!