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: 'stackedcolumn2d',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"xaxisname": "Months",
"yaxisname": "Temperature (°C)",
"prefix": "°C",
"caption": "Temperature variation by Month",
"plotgradientcolor": "",
"zeroplanethickness": "1",
"plotspacepercent": "80",
"animation": "0"
},
"annotations": {
"groups": [
{
"id": "median",
"showBelow": "0",
"showTooltip": "1",
"items": [
{
"id": "median1",
"type": "rectangle",
"radius": "3",
"x": "190",
"y": "135",
"toX": "140",
"toY": "140",
"fillColor": "#444444",
"alpha": "70",
"toolText": "Median 1.2"
},
{
"id": "median1",
"type": "rectangle",
"radius": "3",
"x": "400",
"y": "115",
"toX": "350",
"toY": "120",
"fillColor": "#444444",
"alpha": "70",
"toolText": "Median 5.8"
}
]
}
]
},
"categories": [
{
"category": [
{
"label": "Jan-04"
},
{
"label": "Feb-04"
}
]
}
],
"dataset": [
{
"seriesname": "Maximum",
"color": "7CB5EC",
"data": [
{
"value": "9.4"
},
{
"value": "6.5"
}
]
},
{
"seriesname": "Minimum",
"color": "7CB5EC",
"data": [
{
"value": "-9.7"
},
{
"value": "-8.7"
}
]
}
]
}
});
revenueChart.render();
});