java后台组织数据:
String strXML=""; strXML +="<chart caption='区域日价格比较' xAxisName='区域名称' yAxisName='区域价格(元/吨)' " + " yAxisMinValue='3000' yAxisMaxValue='7000' numberPrefix='¥' showValues='0' formatNumberScale='1'>";
jsp页面展示:
String chartCode = ""; String outxml = (String)request.getAttribute("SEARCH_xml");//得到组织好的数据 if (outxml == null){ outxml = ""; } System.out.println("outxml="+outxml); if(outxml == null || outxml.equals("")) { chartCode=FusionChartsCreator.createChartHTML("../../../01/Charts/MSLine.swf","../../../01/Data/MSLine.xml", "", "myNext", 800, 400, false); }else{ chartCode=FusionChartsCreator.createChartHTML("../../../01/Charts/MSLine.swf", "",outxml , "myNext", 800, 400, false); }