cfrerebeau
19 Apr 2009, 9:38 AM
I have some issues with xAxis and TimeAxis.
- First if I use xAxis and yAxis in the same chart, the yAxis labelRenderer method stop to work. While it works with only yAxis declared.
- When I have xAxis define as a TimeAxis, firefox crash.
- The chart example use already formatted date String, ex: July 08, instead of Date object. So they don't provide any good example for that.
Here is the code that make crash firefox:
xtype: 'columnchart',
store: fund.performanceDS,
url:'../ext-3-rc1/charts.swf',
xField: 'Date',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Value',
labelRenderer : renderPercentage
}),
xAxis: new Ext.chart.TimeAxis({
labelRenderer: renderMonth,
reverse:true
}),
series: [{
type: 'column',
displayName: 'Value',
yField: 'Value'
}]
renderPercentage = function(v) {
if (v) {
v = (parseFloat(v) * 100).toFixed(2);
return v + '%';
}
}
renderMonth = function(v) {
return v.format("m/y")
}
List of chart examples:
http://extjs.com/deploy/ext-3.0-rc1/examples/chart/charts.html
http://extjs.com/deploy/ext-3.0-rc1/examples/chart/charts.html
- First if I use xAxis and yAxis in the same chart, the yAxis labelRenderer method stop to work. While it works with only yAxis declared.
- When I have xAxis define as a TimeAxis, firefox crash.
- The chart example use already formatted date String, ex: July 08, instead of Date object. So they don't provide any good example for that.
Here is the code that make crash firefox:
xtype: 'columnchart',
store: fund.performanceDS,
url:'../ext-3-rc1/charts.swf',
xField: 'Date',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Value',
labelRenderer : renderPercentage
}),
xAxis: new Ext.chart.TimeAxis({
labelRenderer: renderMonth,
reverse:true
}),
series: [{
type: 'column',
displayName: 'Value',
yField: 'Value'
}]
renderPercentage = function(v) {
if (v) {
v = (parseFloat(v) * 100).toFixed(2);
return v + '%';
}
}
renderMonth = function(v) {
return v.format("m/y")
}
List of chart examples:
http://extjs.com/deploy/ext-3.0-rc1/examples/chart/charts.html
http://extjs.com/deploy/ext-3.0-rc1/examples/chart/charts.html