To discover how to utilize the legendItemClicked API event, visit this link -
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'pie2d',
renderAt: 'chart-container',
width: '550',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Split of revenue by product categories",
"subCaption": "Last year",
"numberPrefix": "$",
"showPercentInTooltip": "0",
"decimals": "1",
"legendPosition": "right",
//Theme
"theme": "fusion",
"tooltipBorderRadius": "20"
},
"data": [{
"label": "Food",
"value": "285040"
},
{
"label": "Apparels",
"value": "146330"
},
{
"label": "Electronics",
"value": "105070"
},
{
"label": "Household",
"value": "49100"
}
]
},
"events": {
"legendItemClicked": function(eventObj, dataObj) {
if (eventObj.data.datasetName === "Food") {
window.location.href = "https://www.fusioncharts.com/dev/";
}
}
}
}).render();
});
View the demonstration fiddle here - https://jsfiddle.net/7urtdL65/