FusionCharts - Stacked Column 2D Chart in JavaScript
Created using FusionCharts Suite XT - www.fusioncharts.com
by Gagan Sikri
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?cacheBust=56"></script>
<!--
Sample for : Multi-series Column 2D. This sample is showing comparison of quarterly revenue for two years at Harry's SuperMart.
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'stackedcolumn2d',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Comparison of Quarterly Revenue",
"xAxisname": "Quarter",
"yAxisName": "Revenues (In USD)",
"numberPrefix": "$",
"plotFillAlpha" : "80",
"theme": "fint",
"captionFontSize" : "14",
"showBorder" : "0",
"canvasBorderAlpha" : "0",
"divlineAlpha" : "100",
"divlineColor" : "#999999",
"divlineThickness" : "1",
"divLineIsDashed" : "1",
"divLineDashLen" : "1",
"divLineGapLen" : "1",
"usePlotGradientColor" : "0",
"showplotborder" : "0",
"placeValuesInside" : "1",
"showHoverEffect" : "1",
"showXAxisLine" : "1",
"xAxisLineThickness" : "1",
"xAxisLineColor" : "#999999",
"showAlternateHGridColor" : "0",
"legendItemFontSize" : "10",
"legendItemFontColor" : "#666666"
},
"categories": [
{
"category": [
{ "label": "LA" },
{ "label": "MA" },
{ "label": "FL" },
{ "label": "CA" }
]
}
],
"dataset": [
{
"seriesname": "Fishery",
"data": [
{"value": ""},
{ "value": "11500" },
{ "value": "12500" },
{ "value": "15000" }
]
},
...