PDA

View Full Version : chart: Dynamic axis min/max



AndrewY
15 Dec 2009, 7:05 AM
Is there a method for dynamically modifying the NumericAxis's minimum/maximum values in a linechart?

AndrewY
15 Dec 2009, 8:14 AM
Found it:

myChart.xAxis.maximum = value;

My purpose was to dynamically change the xAxis of a chart to view more or less detail.
So, I've used in bbar of the chart window:



Ext.Slider({
maxValue:365
,value:365
,listeners:{
change: function(chart,value){
var myChart = Ext.getCmp('myChart');
myChart.xAxis.maximum = value;
Ext.Msg.alert(myChart.xAxis.maximum);
}
}
})

This does modify maximum value. However, I don't know how to refresh/reload the chart without making a server call with a new baseParam of the maximum value.