Home forums Using CanvasJS update chart with new values Reply To: update chart with new values


Vishwas R


Datapoint accepts x-value and y-value with optional label and z-value. In your case, on click of update button, you seem to be passing ‘w’ instead of ‘y’. Changing chart.options.data[0].dataPoints[i] = {x:date1, w:w}; to chart.options.data[0].dataPoints[i] = {x:date1, y:w}; should work fine in your case.

If this doesn’t solve your requirement, kindly create jsfiddle reproducing the issue, so that we can look into it and help you out.

Vishwas R
Team CanvasJS