Ext.other.statisticsissuer = Ext.extend(Ext.Panel,{
constructor: function(){
var issuerList;
Ext.Ajax.request({
url: BASE_PATH + '/other/StatIssuer.action',
method: "GET",
async: false,
success: function(response, options){
issuerList =  response.responseText ;
alert(response.responseText);
},
scope: this
});

Ext.other.statisticsissuer.superclass.constructor.call(this,{
frame: false,
border: false,
bodyStyle: "padding:0 0", 
layout: 'form',
autoScroll: true,
items: [
new Ext.FormPanel({
  layout:'fit',
  height:1000,
  width:1000
  })
],
mmmm:function()
{
changeData.params({
changeType:'single',
objectData: jsonObject,
caption:"水果月销量报表",
xAxisName:"月份",
yAxisName:"销量",
seriesname:"key3",
categoryName:"key1",
showValues:"0",
render:"single_fcf_div",
chartType:"Pie3D.swf"
});
changeData.render(this.get(0).id);

}
  });

}
});issuerList 是从java后台返回的json格式的数据,如何显示出来呢? 这个前台我是已经用了ext的 想要在ext页面把这个饼图显示出来

解决方案 »

  1.   

    fusionChart使用json数据实现报表http://wenku.baidu.com/view/b6d945543c1ec5da50e270d0.html
      

  2.   

    恩 我看过这个文档了~ 它里面的setJSONUrl 是引用的路径和写的死数据 我这里使用的url: BASE_PATH + '/other/StatIssuer.action',
    来获取后台数据的 改怎么写呢?
      

  3.   

    这样么?Ext.other.statisticsissuer = Ext.extend(Ext.Panel,{
    constructor: function(){
    // Ext.other.statisticsissuer.superclass.constructor.call(this,{
    frame: false,
    border: false,
    bodyStyle: "padding:0 0", 
    layout: 'form',
    autoScroll: true,
    loadChart:function(){
    var changeData = new FusionCharts("public/js/Pie2D.swf", "myChartId", "400", "300", "0", "1");
    changeData.setJSONUrl(BASE_PATH+'/other/StatIssuer.action');
    changeData.render(this.get(0).id);
    },
    items: [
    new Ext.FormPanel({
      layout:'form',
      height:600,
      width:600
      })
    ]
      });

    }
    });页面还是没有显示什么~ 因为我这里现实的饼状图 这样是不是有什么不妥啊?