Hi Ed,
Thanks for using Syncfusion products,
We have analyzed your query and as per your requirement we have prepared a sample. In that sample we have added two buttons, one is to start the live charts and another is to stop the dynamic update. In start button click, we have refresh data by calling the refresh method and the chart refreshed with new data in the set interval method. Sample for your reference can be find from below link,
Please find the code snippet below to achieve this requirement,
|
<button onClick={this.start.bind(this)}>Start
</button>
<button onClick={this.stop.bind(this)}>Stop
</button>
start() {
this.timerID = setInterval(
() => this.live(),
500
);
}
stop() {
clearInterval(this.timerID);
}
live() {
if (this.value < 25) {
this.value += Math.random() * 2.0;
} else {
this.value -= 2.0;
}
this.series1.push({ x: this.i, y: this.value, size: Math.random() });
this.i++;
this.series1.shift();
this.chart.series[0].dataSource = this.series1;
this.chart.refresh();
} |
If the issue is still persists from your side, kindly revert us by modify the above sample or provide your sample with replication steps which will be helpful in further analysis and provide you the solution sooner.
Thanks,
Baby.