1๐
โ
If you want to update your data while it being animated you cant replace the data object. In order to change the data you will have to change the data array directly. If you do that the animations keep playing
So instead of doing chart2.config.data = data4;
you will need to do myBar.data.datasets[datasetIndex].data = newData;
Source:stackexchange.com