Clicks are sometimes missed with clickmode layout key


This is William Huang from the Streamlit Open Source team!
I am currently attempting to provide selection on charts for the Streamlit st.plotly_chart api. I noticed there are on_select and on_click callbacks that we can register to. The on_click callbacks always register and that seems fine.

However, when I try to use the clickmode: “event+select” in the layout of the graph, clicks are sometimes missed. This can be replicated here:

or here:

Is there someone that can help me to understand why clicks are being missed? We are trying to release this feature within streamlit so any help would be appreciated!

I created a demo app here: that uses this clickmode layout property. (FEEL FREE TO CHECK OUT :wink: )

hi @willhuang
Thanks for reporting. We’ll look into this and get back to you with an update soon.

1 Like

Hi @adamschroeder ,

Thanks for getting back to me so quickly. Let me know if I can help in anyway and speed up the process!


Please open a new issue on the plotly.js repository at Issues · plotly/plotly.js · GitHub

done: Clicks are sometimes missed with clickmode layout key · Issue #6898 · plotly/plotly.js · GitHub

Let me know if you need anything and will be happy to help.

1 Like