I would like to dynamically change the axis maximum limit of an ExtJS 4.x chart.
I tried using a listener beforerefresh
but this has no effect:
var chart = Ext.create('Ext.chart.Chart', {
...
listeners: {
beforerefresh(me, eOpts)
{
// set y-axes to max(raw_value)
console.log('before refresh');
// set maximum axis value of Y axis to 0.1
me.axes.getAt(1).maximum = 0.1;
}
},
The code is reached, but using me.axes
does not seem to have any effect at all.
What is the correct way to do it?
Thanks