所属分类:常用实例教程
一、图表容器
<div id="chart-1" style='width:800px;height:380px;margin:30px auto 0'></div>
二、引入所需JS
<script src="js/fusioncharts.js"></script> <script src="js/themes/fusioncharts.theme.ocean.js"></script>
三、fusioncharts生成统计图表
include("includes/fusioncharts.php"); $columnChart = new FusionCharts("column2d", "ex1", "100%", 400, "chart-1", "json", '{ "chart":{ "caption":"柱状图", "subCaption":"fusioncharts多皮肤数据图表", "numberPrefix":"$", "theme":"ocean" }, "data":[ { "label":"Bakersfield Central", "value":"880000" }, { "label":"Garden Groove harbour", "value":"730000" }, { "label":"Los Angeles Topanga", "value":"590000" }, { "label":"Compton-Rancho Dom", "value":"520000" }, { "label":"Daly City Serramonte", "value":"330000" } ] }'); // Render the chart $columnChart->render();