Javascript 面积图不起作用
这里的链接为我的图表在使用sencha触摸,它不工作,这里的代码Javascript 面积图不起作用,javascript,extjs,charts,sencha-touch-2,Javascript,Extjs,Charts,Sencha Touch 2,这里的链接为我的图表在使用sencha触摸,它不工作,这里的代码 Ext.define("dashboard.view.HrsWorkedChart", { extend: "Ext.chart.Chart", requires: ["Ext.chart.Panel", "Ext.chart.axis.Numeric", "Ext.chart.axis.Category", "Ext.chart.series.Area",
Ext.define("dashboard.view.HrsWorkedChart", {
extend: "Ext.chart.Chart",
requires: ["Ext.chart.Panel",
"Ext.chart.axis.Numeric",
"Ext.chart.axis.Category",
"Ext.chart.series.Area",
"Ext.draw.engine.ImageExporter"],
alias: "widget.hrsworkedchart",
config: {
flex: 1,
shadow: true,
animate: true,
store: store1,
cls: "chart",
innerPadding: 20,
legend: {
position: {
portrait: "right",
landscape: "bottom"
},
labelFont: "20px Arial"
},
axes: [{
type: "numeric",
position: "left",
fields: ['2003', '2004', '2005', '2006', '2007', '2008', '2009'],
title: "Number of Hits",
minimum: 0,
adjustMinimumByMajorUnit: 0
}, {
type: "category",
position: "bottom",
fields: ["hrsworked"],
title: "Month of the Year"
}],
series: [{
type: "area",
highlight: true,
axis: "left",
xField: "year",
yField: ['2003', '2004', '2005', '2006', '2007', '2008', '2009']
}],
}
});
请帮我解决这个问题非常奇怪,我试图修改你的小提琴,但无法使它工作。也许您可以从ExtJS中的一个图表示例开始,一步一步地修改它以发现问题。您的requires项引用不存在的类。例如,sencha touch中没有这样的类Ext.chart.Panel。但在示例中,他们提到了问题2:legend.position似乎不正确。看起来它不能是对象,只能是字符串。看见顺便说一句,不推荐使用停靠位置。请提供示例链接