apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
325 stars 81 forks source link

dataPointIndex is always -1 for events triggered on a pie chart #328

Closed Pyknic closed 5 months ago

Pyknic commented 6 months ago

I have created a pie chart with this config:

this.config = {
    chart: {
      ...this.defaultChartConfig(),
      events: {
        click(e: any, chart?: any, options?: any) {
          console.log('Click. Series index: ' + options.seriesIndex + ', data point index: ' + options.dataPointIndex);
        }
      }
    }
  };

Series index and data point index is always -1. For bar charts, it works as expected.

junedchhipa commented 5 months ago

Can you please try with the latest apexcharts version and test again? Also, provide a codepen example in case it didn't work.