FusionCharts - Column 2D Chart in JavaScript
Created using FusionCharts Suite XT - www.fusioncharts.com
by sanjuktamukherjee
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!--
A simple Column 2D chart showing monthly revenue of Harry's SuperMart for last year.
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'stackedbar2d',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Company Revenue",
"xaxisname": "Month",
"yaxisname": "Revenue",
"showvalues": "1"
},
"categories": [
{
"category": [
{
"label": "Jan"
},
{
"label": "Feb"
},
{
"label": "Mar"
},
{
"label": "Apr"
},
{
"label": "May"
},
{
"label": "Jun"
},
{
"label": "Jul"
},
{
"label": "Aug"
},
{
"label": "Sep"
},
{
"label": "Oct"
},
{
"label": "Nov"
},
{
"label": "Dec"
}
]
}
],
"dataset": [
{
"seriesname": "Product A",
"alpha": "0",
"data": [
{
"value": "274"
},
{
"value": "298"
},
{
"value": "258"
},
{
"value": "268"
},
{
"value": "296"
},
{
"value": "326"
},
{
"value": "318"
},
{
"value": "367"
},
{
"value": "297"
},
{
"value": "319"
},
{
"value": "348"
},
{
"value": "248"
}
]
},
{
"seriesname": "Product B",
"data": [
{
"value": "100"
},
{
"value": "115"
},
{
"value": "125"
},
{
"value": "150"
},
{
"value": "110"
},
{
"value": "98"
},
{
"value":...