总的来说:
amcharts 要一个“配置文件”(setting.xml),一个数据文件(amile_data.xml),一个 SWFObject.js,一个对应的 SWF 就可以生成漂亮的统计报表了。
使用前进行配置
<body>
<script type="text/javascript" src="./amline/swfobject.js"></script>
<div id="flashcontent" style="width:200; height:500" >
<strong>You need to upgrade your Flash Player</strong>
</div>
<script type="text/javascript">
var so = new SWFObject("./amline/amline.swf", "amline", "360", "300", "8", "#FFFFFF");
so.addVariable("path", "./amline/");
so.addVariable("chart_id", "chart1");
so.addVariable("settings_file", escape("amline/amline_settings.xml"));
so.addVariable("preloader_color", "#999999");
so.addVariable("data_file","amline/data.jsp?<%=randoms%>");
so.write("flashcontent");
function getData(){
so.write("flashcontent");
}
</script>
</body>