Hi!
I am working on a Bokeh application where I want to display a huge dataset (millions of points) from a pd.dataframe rastered in 2D with Holoviews.
Then, there is a button that if the user zoomed into the data enough (let’s just say if xrange and yrange are small enough), plots the currently visible data in another visualization (in my case a 3D viz with Three.js).
However, I am having a hard time accessing the currently visible data in the raster plot. I tried passing the full data via a ColumnDataSource but since this gets fully serialized, it breaks my browser.
I see two options:
- I somehow access the data that I assume Holoviews must have filtered somehow already. Not sure if this is possible since HV probably discards that filtered data after it created the rastered image.
- I let Python filter my data on that button click, create a filtered CDS of some kind and pass that to my JS function that updates the custom detailed plot. But here, I have no clue how I would create a callback that runs a python function that filters the df, creates the CDS and calls a JS function with it.
Maybe someone here has a clue. I can potentially prepare an example but it will take quite some time to extract the relevant parts. Maybe someone can tell me if what I want to do is possible first.