Hi Mark,
Thanks for using Syncfusion products,
We have analyzed your query and as per your requirement we have prepared a sample in which the chart got initialized in componentWillMount. In that sample we have refreshed the data in set interval by using refresh method in chart options.
Please find the code snippet below to achieve this requirement,
|
componentWillMount() {
this.tick();
}
componentDidMount() {
this.timerID = setInterval(
() => this.tick(),
100
);
}
componentWillUnmount() {
clearInterval(this.timerID);
}
tick() {
if (this.value < 25) {
this.value += Math.random() * 2.0;
} else {
this.value -= 2.0;
}
this.series1.push({ x: this.i, y: this.value });
this.i++;
this.series1.shift();
this.setState({ title: 'akdsjajf'+ this.i, series1: this.series1 });
if (this.chart) {
this.chart.refresh();
}
} |
Screenshot:
Sample for your reference can be find from below link,
More information on dynamic update can be found in the below link
Kindly revert us, if you have any concerns.
Thanks,
Baby.