JS使用FusionCharts显示图表(JS插件)

2016/2/4
 1.jQuery.getJSON(url, [data], [callback])
   url:发送请求地址。
   data:待发送 Key/value 参数。
   callback:载入成功时回调函数。
   例,
   jq.getJSON(
  "<%=servletPrefix%>FCExporterServlet.bghc",
  {
   "czlx" : type,
   "ZJM" :  encodeURI(encodeURI(ZJM)),
   "ksj" : ksj,
   "jsj" : jsj
  },
  function(data){
   var ret = data.xml;
    var myExportComponent ;
    if(FusionCharts('myChartId2')!=undefined) FusionCharts('myChartId2').dispose();
    var myChart = "";
    if(type=="deptJEYear"){
     myChart = new FusionCharts( "<%=path%>/module/report/charts/Column3D.swf",   
         "myChartId2", "800", "600", "0" );
    }else{
     myChart = new FusionCharts( "<%=path%>/module/report/charts/Pie3D.swf",   
         "myChartId2", "800", "600", "0" );
    }
    myChart.setDataXML(ret);
     myChart.render("chartContainer");
  }
 
   );

猜你喜欢

转载自itommy.iteye.com/blog/2276653
今日推荐