PDA

View Full Version : "chart.setYAxis()" works under firefox, but not work under IE7



vickyii
12 Feb 2010, 11:54 PM
I want dynamic change the minimum and maximum value for yAxis for a linechart, the code is below:

var chart = Ext.getCmp('linechart');
chart.setXAxis(new Ext.chart.CategoryAxis({
title : ondas.m_sLastSensor
}));

var low = 0;
var high = 0.24;
var unit = (high - low)/10;
if(unit>=1) unit = Math.round(unit);
var yAxis = new Ext.chart.NumericAxis({
minimum: low,
maximum: high,
majorUnit: unit,
labelRenderer : Ext.util.Format.numberRenderer('0.00')
});
chart.setYAxis(yAxis);

now under firefox, it works good. But under IE7, no changes.

help!

vickyii
13 Feb 2010, 12:38 AM
just remove this line:
labelRenderer : Ext.util.Format.numberRenderer('0.00')

it works, but I need Ext.util.Format.numberRenderer('0.00') to format the data