arthurakay
22 Apr 2009, 10:53 AM
I'm having issues trying to get the Pie Charts to work. If I declare the chart in-line as an xtype, things work just fine:
...
items: [
{
xtype: 'piechart',
categoryField: 'testResult',
dataField: 'testResult',
height: 200,
style: {
legend: {
display: 'right'
}
},
store: Ext.ux.UnitTest.Store,
url: 'ext-3.0-rc1/resources/charts.swf',
width: 200
}
]
...
But if I try to declare the object ahead of time, it doesn't render:
Ext.ux.UnitTest.Chart = new Ext.chart.PieChart({
categoryField: 'testResult',
dataField: 'testResult',
height: 200,
style: {
legend: {
display: 'right'
}
},
store: Ext.ux.UnitTest.Store,
url: 'ext-3.0-rc1/resources/charts.swf',
width: 200
});
...
items: [
Ext.ux.UnitTest.Chart
]
...
Does anyone have an idea about what I'm missing? Since Ext.chart.PieChart inherits from Ext.Component, shouldn't it just render with it's parent (like it doesn when declared in-line)?
...
items: [
{
xtype: 'piechart',
categoryField: 'testResult',
dataField: 'testResult',
height: 200,
style: {
legend: {
display: 'right'
}
},
store: Ext.ux.UnitTest.Store,
url: 'ext-3.0-rc1/resources/charts.swf',
width: 200
}
]
...
But if I try to declare the object ahead of time, it doesn't render:
Ext.ux.UnitTest.Chart = new Ext.chart.PieChart({
categoryField: 'testResult',
dataField: 'testResult',
height: 200,
style: {
legend: {
display: 'right'
}
},
store: Ext.ux.UnitTest.Store,
url: 'ext-3.0-rc1/resources/charts.swf',
width: 200
});
...
items: [
Ext.ux.UnitTest.Chart
]
...
Does anyone have an idea about what I'm missing? Since Ext.chart.PieChart inherits from Ext.Component, shouldn't it just render with it's parent (like it doesn when declared in-line)?