首页 新闻 会员 周边

extjs 3.40 自带图表怎么用?

0
[已解决问题] 解决于 2016-01-19 12:29

Ext.ns('DrawChart');
  /**
  * 绘制图表
  *
  * @class DrawChart.js
  * @extends Ext.Panel
  * @example
  * @author KangJunYun
  */

  DrawChart= Ext.extend(Ext.Panel,{
    constructor:function(config){
      Ext.applyIf(this, config);
      this.initUI();
      DrawChart.superclass.constructor.call(this,
      {
        id : 'DrawChart',
        title : '图表',
        iconCls : 'menu-appuser',
        layout : 'border',
        items : [this.chart],

        autoScroll : true
      }
    );
},
  initUI:function(){
    var store = new Ext.data.JsonStore({
    fields: ['season', 'total'],
    data: [{
      season: 'Summer',
      total: 150
      },{
        season: 'Fall',
        total: 245
      },{
        season: 'Winter',
        total: 117
        },{
        season: 'Spring',
        total: 184
  }]
});

}
}
);

 

 

 

点击之后浏览器爆的错误是:

康大头的主页 康大头 | 初学一级 | 园豆:25
提问于:2016-01-18 18:37
< >
分享
最佳答案
1

为嘛不用 echarts 多好用的图表空间呀

奖励园豆:5
jsasjs | 菜鸟二级 |园豆:228 | 2016-01-19 10:35

echarts 可以跟extjs 整合? 难度大吗?有没有  实例,谢谢了OHL

康大头 | 园豆:25 (初学一级) | 2016-01-19 10:46

@漫天de光:  echarts 是百度的开源组件。非常简单。你直接百度就知道了。。。

jsasjs | 园豆:228 (菜鸟二级) | 2016-01-19 10:49
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册