Chartjs-How to Update beginAtZero in Chart.js

1👍

myBarChart.options.scales.yAxes[0].ticks.beginAtZero = false;   

// You probably also want to move your min :
myBarChart.options.scales.yAxes[0].ticks.min = 100;

// and call update:
// myBarChart.update();

Here’s pen with some buttons if you want to experiment:

Chart.js add/remove adjust data

Another thing you can do, is destroy and rebuild the chart :

Chart.js Toggle Chart

Leave a comment