score:2

Accepted answer

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(); })

see: https://jsfiddle.net/gdqkltc2/3/


Related Query

More Query from same tag