fushionchats free是一个免费版的flash报表工具,官网地址http://www.fusioncharts.com/free/
1.基于fushionchats free开发报表主要是xml数据的拼凑,例如:
<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'> <set name='Jan' value='462' color='AFD8F8' /> <set name='Feb' value='857' color='F6BD0F' /> <set name='Mar' value='671' color='8BBA00' /> <set name='Apr' value='494' color='FF8E46' /> <set name='May' value='761' color='008E8E' /> <set name='Jun' value='960' color='D64646' /> <set name='Jul' value='629' color='8E468E' /> <set name='Aug' value='622' color='588526' /> <set name='Sep' value='376' color='B3AA00' /> <set name='Oct' value='494' color='008ED6' /> <set name='Nov' value='761' color='9D080D' /> <set name='Dec' value='960' color='A186BE' /> </graph>
具体xml的格式参见帮助文档,xml文件中各项属性,在帮助文档中也有
2.js方式显示报表非常简单
<script language="JavaScrip t" src="../FusionCharts/FusionCharts.js" ></script> //注意路径 <div id="chartdiv" align="center>图形将出现这个DIV里,到时这里的字将被图形替代。</div> <script type="text/javascript"> var myChart = new FusionCharts("../FusionCharts/FCF_Column3D.swf", "myChartId", "600", "500");//注意路径 myChart.setDataURL(\"dataStr\"); //dataSt为拼凑的xml格式的字符串 myChart.render("chartdiv"); </script>