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": {
"plotspacepercent": "80",
"animation": "0",
"theme": "fint"
},
"annotations": {
"groups": [
{
"id": "median",
"showbelow": "0",
"showtooltip": "1",
"items": [
{
"id": "bar1",
"type": "rectangle",
"radius": "3",
"x": "325",
"y": "200",
"tox": "330",
"toy": "160",
"fillcolor": "#444444",
"alpha": "70",
"tooltext": "10"
},
{
"id": "bar1",
"type": "rectangle",
"radius": "3",
"x": "470",
"y": "50",
"tox": "465",
"toy": "90",
"fillcolor": "#444444",
"alpha": "70",
"tooltext": "5.5"
}
]
}
]
},
"categories": [
{
"category": [
{
"label": "Innovation"
},
{
"label": "Availability"
}
]
}
],
"dataset": [
{
"seriesname": "Data",
"data": [
{
"value": "9.4"
},
{
"value": "6.5"
}
]
}
]
}
});
revenueChart.render();
});