I built a bar chart using fusion charts and I figured out how to use the dataPlotClick function. Now I would like to set a colour to specific bars that the user clicks on and I searched multiple sources; however, it seems that this is something not common.
Can someone provide me with some help on how I can set a colour to the bar that the user clicks on?
This is my code
var myChart = new FusionCharts({
type: "column2d",
renderAt: "chart-container",
width: "100%",
height: "100%",
dataFormat: "json",
dataSource: dataSourceMyChart,
events:{
dataPlotClick: function(e) {
var infoElem = document.getElementById("infolbl");
var index = e.data.dataIndex;
}
}
}).render();