fusioncharts 3.2.1 柱状图示例
时间: 2023-08-19 12:04:07 浏览: 133
FusionCharts_柱状图详解
5星 · 资源好评率100%
好的,以下是一个基本的 fusioncharts 3.2.1 柱状图示例,您可以参考一下:
HTML 代码:
```
<div id="chart-container">FusionCharts will render here</div>
```
JavaScript 代码:
```
FusionCharts.ready(function(){
var revenueChart = new FusionCharts({
type: 'column2d',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Monthly revenue",
"subCaption": "Last year",
"xAxisName": "Month",
"yAxisName": "Revenue",
"theme": "fint"
},
"data": [{
"label": "Jan",
"value": "420000"
}, {
"label": "Feb",
"value": "810000"
}, {
"label": "Mar",
"value": "720000"
}, {
"label": "Apr",
"value": "550000"
}, {
"label": "May",
"value": "910000"
}, {
"label": "Jun",
"value": "510000"
}, {
"label": "Jul",
"value": "680000"
}, {
"label": "Aug",
"value": "620000"
}, {
"label": "Sep",
"value": "610000"
}, {
"label": "Oct",
"value": "490000"
}, {
"label": "Nov",
"value": "900000"
}, {
"label": "Dec",
"value": "730000"
}]
}
}).render();
});
```
这个示例演示了一个基本的柱状图,用于展示公司去年每个月的收入情况。您可以根据自己的需求进行修改和扩展。
阅读全文