Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

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