1👍
✅
You can use jQuery:
- Add the jQuery library
- Add a button, I added
<button id="action">action</button>
- Add a jQuery trigger that executes the 2 lines on click:
$('#action').off().on('click', function() {
myLineChart.options.scales.yAxes[0].ticks.min = -50;
myLineChart.update();
})
Source:stackexchange.com