Streamlit drilldown suggestions

I have a scenrio:

  1. First when the page loads a plotly chart is displayed.
  2. When the user clicks on the data points we need to dynamically fetch the data and display more info about it. like drill down into specific data points. Any suggestions for the drill down scenario.

At the moment, the native plotly chart element does not send back click events, but that is a highly requested feature and it sounds like it’s on their roadmap for the next year.

In the meantime, you can use a custom component to achieve this. Here’s a component for it: GitHub - null-jones/streamlit-plotly-events: Streamlit component that allows Plotly events to bubble back up to streamlit. Makes Plotly charts interactive!

There are several forks, so not sure if someone has improved on it in the last two years.