FusionCharts - Gallery Example - Doughnut 2D Chart
Created using FusionCharts Suite XT - www.fusioncharts.com
HTML
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<!-- Doughnut chart example with:
# Center label in 2D chart
# Disabled tool-tips are disabled, but extended center label info on hover
-->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'pie2d',
renderAt: 'chart-container',
width: '350',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of Revenue by Product Categories",
"subCaption": "Last year",
"pieRadius": "140",
"showBorder": "1",
"numberPrefix": "$",
"startingAngle": "310",
"showLabels": "0",
"showLegend": "0",
"showValues": "0",
//"showTooltip": "0",
"decimals": "0",
"theme": "fusion"
},
"data": [{
"label": "Food",
"value": "28504"
},
{
"label": "Apparels",
"value": "14633"
},
{
"label": "Electronics",
"value": "10507"
}
],
"annotations": {
"showBelow": "0",
"width": "500",
"height": "100",
"autoScale": "1",
"groups": [{
"items": [{
"fontColor": "#000000",
//"bold": "1",
"type": "text",
"text": "Food, $29 K",
"x": "230",
"y": "165"
},
{
"fontColor": "#000000",
//"bold": "1",
"type": "text",
"text": "Apparels, $15 K",
"x": "100",
"y": "210"
},
{
"fontColor": "#000000",
//"bold": "1",
"type": "text",
"text": "Electronics,{br}$11 K",
"x": "185",
"y": "280"
}]
}]
}
}
}).render();
});