在ExtJS 4.2.2中使用Highcharts
我尝试使用Highcharts I ExtJS。 我写了我的app.js:在ExtJS 4.2.2中使用Highcharts,extjs,svg,highcharts,Extjs,Svg,Highcharts,我尝试使用Highcharts I ExtJS。 我写了我的app.js: Ext.onReady(function () { Ext.define('myModel', { extend: 'Ext.data.Model', fields: [{ name: 'month' }, { name: 'value' }] }); Ext.define('mySt
Ext.onReady(function () {
Ext.define('myModel', {
extend: 'Ext.data.Model',
fields: [{ name: 'month' }, { name: 'value' }]
});
Ext.define('myStore', {
extend: 'Ext.data.Store',
model: 'myModel',
data: [{
month: '1',
value: 1
}, {
month: '2',
value: 12
}]
});
var sto = Ext.create('myStore');
var win = new Ext.create('Ext.window.Window', {
layout: 'fit',
width: 480,
height: 320,
items: [{
xtype: 'highchart',
series: [{
dashStyle: 'DashDot',
dataIndex: 'value'
}],
xField: 'month',
store: sto,
chartConfig: {
chart: {
type: 'spline'
},
title: {
text: 'A simple graph'
}
}
}]
}).show();
});
加载的页面没有错误,但表单上没有任何图表。
我检查过,DOM中添加了一些元素,但在表单上看不到。
重要的是,添加的元素不包含SVG组件,它们只是id为“highchart-1010-north-handle”的div(空div)
这是我在ExtJS中的第一个highchart示例。
我举了一个例子,但结果是一样的——没有错误,但表单上也没有任何图表
我做错什么了吗
我已共享。是否有人可以在ExtJS中使用Highchart向我展示工作示例?首先,从Ext.create调用中删除
new
运算符,然后重试。我从Ext.create中删除new operator-在以下示例中没有结果共享完整示例: