PDA

View Full Version : Piechart ????



Tommy1969
4 Jun 2009, 8:09 PM
Ext JS 3.0 RC2 ? Piechart ?????????????????????????????????????Linechart ? Barchart ????????????????????

???????



var pietest = {
init: function() {
var that = this;

this.store = new Ext.data.ArrayStore({
fields: ['name', 'value'],
data: [
['R1', '60'],
['R2', '75']
]
});

this.grid = new Ext.grid.EditorGridPanel({
store: this.store,
cm: new Ext.grid.ColumnModel({
defaults: {
sortable: true,
width: 60
},
columns: [
{header:'Name', dataIndex:'name'},
{header:'Value', dataIndex:'value', editor: {xtype: 'numberfield'}}
]
}),
stripeRows: true,
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
height: 100
});

this.pchart = new Ext.Panel({
items: [{
xtype: 'piechart',
store: this.store,
xField: 'name',
dataField: 'value',
width: 200,
height: 200
}]
});
}
};

Ext.onReady(function() {
pietest.init();
var view = new Ext.Viewport({
items: [pietest.grid, pietest.pchart]
});
});


# 3.0 RC2 ????CacheFly ?????????????m(__)m

yuki
5 Jun 2009, 12:30 AM
????????????????????????????????????
http://extjs.com/forum/showthread.php?p=335809

??????Ext???????YUI?charts.swf???????????????
????YUI????????2.5.1?2.7????????????????????????????????????:D

Tommy1969
8 Jul 2009, 3:14 AM
?????????????????????????:)