I am developing an vertical bar chart using apex chart. But I can't set specific with to single bars and How can I add event handler to this. Suppose when click on one button, it will show one type of data, when click on another button, it will show one type of data.
I tried to develop a dynamic bar chart and I am expecting to make it dynamic according to selected event
You need to add the chart object in the options object which has the events you want to capture like the following:
chart: {
events: {
click: function (event, chartContext, config) {
console.log('mouse move');
}
}
For more details about the events: https://apexcharts.com/docs/options/chart/events/