FusionCharts API-Event: beforeLinkedItemOpen
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="indicatorDiv">Problem: <b> right click on 'pie2d' and 'pie3d' charts activates a link </b>
</div>
<div id="chart-container-pie">FusionCharts will render here</div>
<div id="chart-container-col">FusionCharts will render here</div>
CSS
body {
padding: 5px;
margin: 0 auto;
}
#indicatorDiv {
width: 500px;
font-family:'Arial', 'Helvetica';
font-size: 14px;
margin-bottom: 1em;
}
JavaScript
FusionCharts.ready(function () {
var dat = [{
"label": "Apple",
"value": "810000",
"link": "Javascript: alert('Oh noes!!!');"
}, {
"label": "Cranberry",
"value": "620000",
"link": "Javascript: alert('Oh noes!!!');"
}, {
"label": "Grapes",
"value": "350000",
"link": "Javascript: alert('Oh noes!!!');"
}];
var pieChart = new FusionCharts({
type: 'pie2d',
//type: 'doughnut3d',
renderAt: 'chart-container-pie',
width: '400',
height: '250',
dataFormat: 'json',
id: "myChartId",
dataSource: {
"chart": {
"caption": "Pie chart",
"subcaption": "right click on slice",
"palettecolors": "#f8bd19,#e44a00,#008ee4"
},
"data": dat
}
}).render();
var colChart = new FusionCharts({
//type: 'column2d',
type: 'bar2d',
renderAt: 'chart-container-col',
width: '400',
height: '250',
dataFormat: 'json',
id: "myChartId2",
dataSource: {
"chart": {
"caption": "Column chart",
"subcaption": "try here now",
"palettecolors": "#f8bd19,#e44a00,#008ee4"
},
"data": dat
}
}).render();
});