我在 Extjs4 中为我的一个项目创建了一个简单的折线图,但该图表未绘制正确的数据。
该图表使用与网格相同的存储,但不显示相同的数据。如果不能完全解决问题,是否有任何方法可以追踪问题的根源?
以下是我用来生成图表的代码。
{
xtype: 'chart',
animate: true,
shadow: true,
store: 'Dataalls',
legend: {
position: 'top'
},
axes: [{
type: 'Numeric',
position: 'left',
title: 'Wind Speed',
fields: ['windspeed'],
grid: true
}, {
type: 'Category',
position: 'bottom',
title: 'Time',
fields: ['time']
}],
series: [{
type: 'line',
axis: 'left',
xField: ['time'],
yField: ['windspeed']
}]
}
(我尝试使用 type: 'Time' 作为 x 轴,但得到错误“date.getFullYear is not a function”)