FusionCharts - Gallery Example - Stacked Bar 2D
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>
<!-- Stacked Bar 2D chart showing product wise quarterly revenue for the current year. -->
<div id="chart-container1">FusionCharts will render here</div>
<div id="chart-container2">FusionCharts will render here</div>
CSS
#chart-container1{
float:left;
},
#chart-container2{
float:right;
}
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'stackedbar2d',
renderAt: 'chart-container1',
width: '400',
height: '150',
dataFormat: 'json',
dataSource: {
"chart": {
"showYAxisValues":"0",
"numberPrefix": "$",
"paletteColors": "#D9D9D9,#00B050",
"bgColor": "#ffffff",
"borderAlpha": "20",
"showLabels":"1",
"showCanvasBorder": "0",
"usePlotGradientColor": "0",
"plotBorderAlpha": "10",
"legendBorderAlpha": "0",
"legendShadow": "0",
"valueFontColor": "#000000",
"showXAxisLine": "1",
"showLegend":"0",
"xAxisLineColor": "#999999",
"divlineColor": "#999999",
"divLineIsDashed": "1",
"showAlternateVGridColor": "0",
"subcaptionFontBold": "0",
"subcaptionFontSize": "14",
"showHoverEffect":"1"
},
"categories": [
{
"category": [
{
"label": "Top 1"
},
{
"label": "Top 2"
},
{
"label": "Top 3"
},
{
"label": "Top 4"
},
{
"label": "Top 5"
}
]
}
],
"dataset": [
// 1st dataSet object for the first chart
{
"showValues": "1",
...