I have created a line chart that is able to update its data successfully in chartjs and I am trying to change the option values dynamically as well. More specifically I want to be able to change the scale. I would like to avoid re-creating the chart everytime updates are needed. Is there a way to update the options dynamically such as :
myLiveChart.options.scaleStepWidth = 10;
myLiveChart.update();
Note: I have tried the following as well :
myLiveChart.scaleStepWidth = 10;
Also tried myLiveChart.render(); instead of update, but nothing seems to really work.
here is a fiddle illustrating the problem: http://jsbin.com/yaxafehixe/1/edit?html,js,output
scalessection, they are directly underoptionssectionmyLiveChart.options.animation = true;and to my surprise it worked... which is weird because any other options i've tried, such as the ones i am trying to change, are not working...