How to change min and max value for line charts dynamically in Ext JS 4

extjs, extjs-chart, extjs4, javascript

Solution

Thats how i set the max limit:

chart.axes.items[1].maximum = newValue;

For minimum should be the same.

Problem

How to changes the min and max limit of line chart once chart is loaded. Issue is when once chart is loaded if data is dynamically changed at time chart look awkward. For example when initial max value in chart is 90 out 100 and on refresh new max comes like 25 but due to max value not getting change in chart .. 3/4 looks empty as 25 doesn't scale to over full chart.

Original source