Return points selected using plotly in Shiny for python

Hi,

Would anybody be able to give any pointers how to return the points selected when using Plotly in Python Shiny? I would like to be able to select a point in Plotly and display the corresponding row in a data grid. I have not been able to figure out how to use the reactive_read approach outlined in the shiny widget guide

Example shiny app hosted on shinylive.io of what I am trying to achieve

Any pointers/suggestions greatly appreciated,

Thanks
Iain

This is fairly awkward, but we did come up with a solution here

I raised a github issue to see if there's a better pattern: How to select points in a plotly plot · Issue #749 · posit-dev/py-shiny · GitHub
Long term we need plotly wrappers which have a more predictable API for selection among other things.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.