FusionCharts - Stacked Column 2D Chart in JavaScript
Created using FusionCharts Suite XT - www.fusioncharts.com
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>
<!-- Showing the Cumulative Sum of stacked data in Stacked Column Chart. This sample is showing product category wise revenue for current year using Stacked Column 2D Chart.
# showSum - Set to 1
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'stackedcolumn2d',
renderAt: 'chart-container',
width: '300',
height: '200',
dataFormat: 'json',
dataSource: {
"chart": {
"theme": "fint",
"caption": "Revenue Chart",
"subCaption": "For current year",
"xAxisname": "Quarter",
"yAxisName": "Revenues (In USD)",
"plotSpacePercent":"0",
"showlegend":"0",
//Showing the Cumulative Sum of stacked data
"showSum": "1",
"numberPrefix": "$"
},
"categories": [
{
"category": [
{"label": "Q1"},
{"label": "Q2"},
{"label": "Q3"},
{"label": "Q4"}
]
}
],
"dataset": [
{
"seriesname": "Food Products",
"data": [
{"value": "11000"},
{"value": "15000"},
{"value": "13500"},
{"value": "15000"}
]
}
]
}
}).render();
});