Determine clicked trace in stacked bar chart

Is it possible to determine, which part of stacked bar was clicked (ie, know the trace for the that part)?

For example, in this example how do I know if LA or SF Zoo was clicked? The plotly_click handler passes all traces under .points property, without obvious hint to the one was clicked.

Or is there a way to get the click coordinates, so that I could use axis scales to calculate the trace that is positioned there?

It is not possible at the moment.

Please subscribe to https://github.com/plotly/plotly.js/issues/965 for the latest development info.

1 Like