Hello,
I work with CanvasJS in Angular and I try to update a chart when a button is pressed. Firstly, in component.ts file I render the chart in ngOnInit.
After that, in another method which is called when that button is pressed, I update the dataPoints like this: this.chart.data.dataPoints=newData and if I print these values using console.log(this.chart.data.dataPoints) the result looks suitable to be used by the chart:
But the chart is not updated and looks like this.
I also tried to call again this.chart.render() after the dataPoints update, but it doesn’t work.
Could you please help me with this issue?
Thank you,
Raluca