Hello, I have funding support to add holoviews objects to Streamlit if that would be something doable in 40ish hours. More specifically: I love everything about Streamlit, but when I convert an xarray.hvplot to bokeh, it no longer re-renders decimate/rasters produced by holoviews’ datashader. ie, If I decimate to 1,000 data points and zoom in, it does not re-render to 1,000 data points. If I do this in Panel, it will re-render to 1,000 points when zooming in. Is adding datashader/holoviews interactively something doable?
HoloViews provides extensive dynamic interactivity built in Python that lets it support dynamically rerendering Datashader plots, dynamically decimating data on a zoom, dynamically linking selections across plots, etc. The HoloViz team would be very happy for these features to work in Streamlit, but the last we looked into it, Streamlit did not support transmitting Bokeh events back from JavaScript into Python to invoke Python code, which is necessary for any of this functionality. That seems like something difficult for an outsider to add to Streamlit, but I hope that it’s on Streamlit’s roadmap?
Hi,
we would also love to see interactive datashader in streamlit. Just checking in with @wroberts4 and the other commenters if there has been any progress or solution in that regard?
There’s been work on communication between Streamlit and Bokeh, in the form of a third party component. The code is currently unmaintained and I never tested it.
Thanks! We gave it a quick try and it seems to be not compatible with a recent bokeh.
Just to connect up threads, there is an open issue on streamlit for implementing bidirectional communication between interactive plots and Python here: Ability to accept input from Charts, Tables, etc. · Issue #455 · streamlit/streamlit · GitHub
Current status is WIP but there is a working prototype for plotly.
There is also a streamlit_bokeh3_events component which appears to support bokeh 3, more info here: Bokeh 3 plots within streamlit including bi-directional communication
Personally I’d love to see full support for bokeh and datashader in streamlit