So far KoolReport's ApexCharts package has not had own client events yet but you can use the default events of the apexcharts javascript library like this:
In normal report:
\koolreport\apexcharts\ColumnChart::create(array(
...
"options" => [
'chart | events | dataPointSelection' => "function(event, chartContext, config) {
// The last parameter config contains additional information like `seriesIndex` and `dataPointIndex` for cartesian charts
console.log('chart dataPointSelection');
}",
Or in Dashboard:
class ColumnChartDemo extends ColumnChart
{
protected function onCreated()
{
$this->settings([
"stacked" => true,
"stackType" => "100%",
"options" => [
"chart | events | dataPointSelection" => "function(event, chartContext, config) {
// The last parameter config contains additional information like `seriesIndex` and `dataPointIndex` for cartesian charts
console.log(chartContext, config);
params = getParamDataFrom(chartContext, config);
widgetAction('ColumnChartDemo','itemSelect',params);
}",
],
]);
}
protected function actionItemSelect($request, $response)
{
//...
}