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
バグですかね?
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