开发需要,记录自己的学习历程。。。
fusioncharts 主要是fusioncharts.js和一些swf文件,代码结构如下图:
fusioncharts文件夹存放fusioncharts所有的资源,便于统一管理。
fusioncharts.html 代码:
<!DOCTYPE HTML> <html> <body onload="init();"> <div id="chartContainer1"></div> <script type="text/javascript" src="fusioncharts/FusionCharts.js"></script> <script type="text/javascript"> function init(){ var chart = new FusionCharts("fusioncharts/Column3D.swf","myChartId","500","300","0","0"); chart.setDataURL("date.xml"); chart.render("chartContainer1"); } </script> </body> </html>
date.xml代码:
<graph caption='Month Sale'> <set name='January' value='462' color='AFD8F8' link="index1.html"/> <set name='Febrary' value='662' color='00D8F8' link="www.google.com"/> </graph>运行效果: