apexcharts bar onclick index

JavaScript
click(event, chartContext, config) {
            console.log(config.seriesIndex);
            console.log(config.dataPointIndex); 
}

Source

Also in JavaScript: