The API for chart.js allows one to edit points of the datasets loaded into it, for example:
.update( )Calling update() on
It is an old thread, but in the current version (as of 1-feb-2017), it easy to replace datasets plotted on chart.js:
suppose your new x-axis values are in array x and y-axis values are in array y, you can use below code to update the chart.
var x = [1,2,3];
var y = [1,1,1];
chart.data.datasets[0].data = y;
chart.data.labels = x;
chart.update();