PDA

View Full Version : Chart Axis labelRenderer only works if data store is autoLoaded



FoxMulder900
28 Oct 2010, 6:01 AM
Hello,
I am trying to use a linechart which will have fairly large numbers on the yAxis so to make them easier to read I want to format the values to have commas. I am currently using the following code:



xtype: 'linechart',
height: 300,
store: BandwidthStore,
url: 'charts.swf',
xField: 'month',
yField: 'bytes',
yAxis: new Ext.chart.NumericAxis({
title: 'Bytes Transferred',
labelRenderer: Ext.util.Format.numberRenderer('0,0')
}),
extraStyle: {
yAxis: {
titleRotation: 90
}
}


However the labelRenderer property only seems to take effect if BandwidthStore has autoLoad set to true. I do not wish to autoLoad the store because the data takes a while to load. I can also somewhat solve the issue by setting the maximum property on the yAxis, however this is also not desirable because the data can vary greatly.

Any suggestions here would be much appreciated!