Open kambajwa opened 7 years ago
you could massage the data if you only care about displaying a specific number of data points... (and there may very well be a way to achieve this in chart options alone)
const maxDataPoints=100;
// data coming from somewhere
dataPoints.push(dataFromSource);
if(dataPoints.length>maxDataPoints){
dataPoints.shift();
}
The demos on Highcharts site actually dont work this way... but rather use methods on the series itself to push datapoints on to the chart (likely in a much more optimal fashion than re-initializing chart every time new data comes in).
I think you have to use
this.chart.series[0].addPoint([Math.random()` * 10], true, true)
instead of
this.chart.series[0].addPoint(Math.random() * 10)
Check out this example. http://plnkr.co/edit/jUnxafwLqcejmiCoi6GS?p=preview
Hi, I replicated the dynamic data from the demo on your site but the x-axis is not moving. it seems to be moving, but as more and more data points are getting added in, it is becoming congested.
http://plnkr.co/edit/OQSFSKisIIWAH0megy4d?p=preview