一定要加type: 'int',否则不显示
var store = new Ext.data.XmlStore({
url: 'test1.xml',
record: 'test',
fields:[{name:'name'},{name:'members', type:'int'}]
});
store.load();
柱状:
var columnChart = new Ext.chart.ColumnChart({
store: store,
//url:'../ext-3.0-rc1/resources/charts.swf',
xField: 'framework',
yField: 'users'
});
饼状:
var pieChart = new Ext.chart.PieChart({
store: store,
dataField: 'users', //information to display in the chart
categoryField : 'framework' //tags or categories
});
线状:
var lineChart = new Ext.chart.LineChart({
store: store,
xField: 'framework',
yField: 'users'
});
本文介绍如何使用ExtJS创建不同类型的图表,包括柱状图、饼状图和线状图,并强调了数据存储配置中类型指定的重要性。
1万+

被折叠的 条评论
为什么被折叠?



