FusionCharts - Displaying anchors in a line chart.
Showing Anchors in chart.
HTML
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var satisfactionChart = new FusionCharts({
type: 'column2d',
renderAt: 'chart-container',
width: '400',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Sales Figures for Top Three Juice Flavors",
"subCaption": "2014",
"xAxisName": "Flavor",
"yAxisName": "Amount",
"numberPrefix": "$",
"theme": "fint"
},
"data": [{
"label": "2018-01-01",
"value": "810000",
"link": "JavaScript:showAlert('2018-01-01')"
},
{
"label": "2018-02-01",
"value": "820000",
"link": "JavaScript:showAlert('2018-02-02')"
},
{
"label": "2018-03-01",
"value": "800000",
"link": "JavaScript:showAlert('2018-03-01')"
}]
},
events: {
'dataplotClick': function(evt, args) {
window.showAlert = function(str){
alert("[Example for the 'JavaScript:' prefix] \n juice sales for the last year: " + arr[1]);
};
//alert("Test");
}
}
});
satisfactionChart.render();
});