FusionCharts - Pie Slicing Start and Slicing End Event
Created using FusionCharts Suite XT - www.fusioncharts.com
by Vishalika
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<div id="chart-container">FusionCharts will render here</div>
<div id="tableCont">
<h3>Click on the pie slices to highlight the index of the slice.</h3>
</div>
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'doughnut2d',
renderAt: 'chart-container',
width: '450',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of revenue by product categories",
"subCaption": "Last year",
"numberPrefix": "$",
"theme": "fint"
},
"data": [{
"label": "Food",
"value": "285040"
}, {
"label": "Apparels",
"value": "146330"
}, {
"label": "Electronics",
"value": "105070"
}, {
"label": "Household",
"value": "49100"
}]
},
events: {
'dataplotClick': function(evtObj, argObj){
alert("index is " +argObj.dataIndex);
},
'slicingStart': function(evtObj, argObj){
alert(". isSliced = " +argObj.slicedState);
},
}
}).render();
});