Raluca,
In order to update chart, you need to either change chart-options and call render or use set method. In your case, updating dataPoints through chart-options seems to be working fine. Please take a look at this updated stackblitz code.
Considering this as duplicate of Chart update on button click in Angular, hence closing the same.
—
Vishwas R
Team CanvasJS