FusionCharts - Gallery Example - Doughnut 2D Chart
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>
<div id="chart-container1">FusionCharts XT will load here!</div>
<div id="chart-container2">FusionCharts XT will load here!</div>
<div id="chart-container3">FusionCharts XT will load here!</div>
CSS
#chart-container1 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
#chart-container2 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 300px;
}
#chart-container3 {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 600px;
}
JavaScript
FusionCharts.ready(function() {
var topStores = new FusionCharts({
type: 'pie2d',
renderAt: 'chart-container1',
width: '300',
height: '500',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of Revenue by Product Categories",
"subCaption": "Last year",
"numberPrefix": "$",
"bgColor": "#ffffff",
"showBorder": "1",
"use3DLighting": "0",
"showShadow": "0",
"enableSmartLabels": "0",
"startingAngle": "310",
"showLabels": "0",
"showPercentValues": "1",
"showLegend": "1",
"legendShadow": "0",
"legendBorderAlpha": "0",
"defaultCenterLabel": "Total revenue: $64.08K",
"centerLabel": "Revenue from $label: $value",
"centerLabelBold": "1",
"showTooltip": "0",
"decimals": "0",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"subcaptionFontBold": "0",
"theme": "fusion"
},
"data": [{
"label": "Food",
"value": "28504"
},
{
"label": "Apparels",
"value": "14633"
},
{
"label": "Electronics",
"value": "10507"
},
{
"label": "Household",
"value": "4910"
}
]
}
})
.render();
var topStores = new FusionCharts({
type: 'pie2d',
renderAt: 'chart-container2',
width: '300',
height: '500',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of Revenue by Product Categories",
"subCaption": "Last year",
"numberPrefix": "$",
"bgColor": "#ffffff",
"showBorder": "1",
"use3DLighting": "0",
"showShadow": "0",
"enableSmartLabels": "0",
"startingAngle": "310",
...