fusioncharts 经常出现no data to display

  我们的系统中使用fusioncharts的仪表盘(AngularGauge),使用ajax

var fusionChartUrl = "${pageContext.request.contextPath}/sdca_map/FusionChart/Charts/AngularGauge.swf?ChartNoDataText=暂无数据显示" ;

function initFunsionChart02(){
var reviseAuditChart = new FusionCharts(fusionChartUrl, "reviseAuditChart1Id", "100%", "100%",  "1","1");
//reviseAuditChart.setDataXML('') ;
reviseAuditChart.setDataURL(escape(getReviseLeakURL(REVISE_ING,'revise'))); 
reviseAuditChart.render("reviseAudit");

function loadAutoReviseData(statusParam,tableParam){

$.ajax({
     dataType:"text",
  cache:false,
  success:function(data){
   var myChart = null ;
   if(null==statusParam||null==tableParam){
   }
   myChart.setDataXML(data) ;
   
  }
 }) ;

}

可以显示出来,但是使用世界之窗的时候经常出现 "no data to display",从网上找了很多方式都解决该问题,

最后使用fusioncharts的调试功能,把

var revisingChart = new FusionCharts(fusionChartUrl, "revisingChart1Id", "100%", "100%", "1","1");

提示的信息如下:

INFO: Chart registered with external script. DOM Id of chart is revisingChart1Id
WARNING: Could not find dataXML or dataURL parameter. Setting empty data for the chart.
ERROR: No data to display. There isn't any node/element in the XML document. Please check if your dataURL is properly URL Encoded or, if XML has been correctly embedded in case of dataXML.
No Data to Display: No dial was found in the XML data document provided. If your system generates data based on parameters passed to it using dataURL, please make sure that dataURL is URL Encoded.

但是alert弹出的data是有值的,我又把ajax修改为dataURL方式调用,(只是尝试一下,意外发现不再出现"no data to display").

具体不知道什么原因引起的,网上有说这个是一个bug的。

记录一下,以备后用。

你可能感兴趣的:(报表,fusionchart,仪表盘,data,display,图表,Java)