Black Lives Matter. Please consider donating to Black Girls Code today.

Click on grouped/stacked bar chart

I have a grouped/stacked bar chart. Need to know which bar is clicked within a group/stack for the event ‘plotly_click’, e.g. if I have grouped bar chart that have 3 groups and within each group there are 5 bars(columns), I wan to know that’s it’s bar number 5 in group 3 is clicked, or something similar. Right know I can only know which group is clicked on using the ‘pointNumber’ with the click event data. Also would need similar thing with stacked bar chart. Thanks.

Duplicate of Determine clicked trace in stacked bar chart

See for a workaround.

1 Like

Thanks @etienne, you saved my day.