[Chartjs]-How to change Y axis value dynamically based on user input in Chartjs for Line chart?

1👍

Suppose we want to change the Y value of X-label ‘March’ from 40 to 50. First change the first dataset’s value of ‘March’ to be 50.
Now calling update function animates the position of ‘March’ from 40 to 50.

myNewChart.datasets[0].points[2].value = 50;   //change the value  
myNewChart.update();   //update the chart

Leave a comment