2👍
I think you are missing a little bit in your changedata function, something like
function changedata(){
testChart.data.datasets[0].data = ['4', '3', '2', '1', '2', '3', '4'];
testChart.update();
}
- Chartjs-Chart.js draw custom grid lines
- Chartjs-How to add space to the bottom of the chart in chartjs [angular]
Source:stackexchange.com