Skip to content

Click events doesn't generate dataPointIndex and seriesIndex for Pie Charts #2251

@PrzemyslawKlys

Description

@PrzemyslawKlys

Bug report

Codepen

https://codepen.io/MadBoyEvo/pen/ExNbVeo

Explanation

  • What is the behavior you expect?

Both dataPointSelection and click event should return dataPointindex or/and series for all types of events correctly.

  • What is happening instead?

Following code behaves differently for different charts. For Pie charts only dataPointSelection provides dataPointIndex, but click event always return -1, -1. Click event for bar chart works correctly so I'm assuming this is a bug, not a feature. Maybe other chart types have the same issue.

events: {
    dataPointSelection: function (event, chartContext, config) {
        console.log(config.dataPointIndex + " " + config.seriesIndex);
    },
    click: function (event, chartContext, config) {
        console.log(config.dataPointIndex + " " + config.seriesIndex);
    }
}
  • What error message are you getting?

No error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions