☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Viewing LOD status in python

Community Support
samr85
samr85

Hi,
I’m working with massive data sets, so my data needs to be cut down significantly in python before the data is sent to the browser. As such, when the user zooms in, I need to send through a new block of data, calculating which might take up to about half a second.

Currently if someone zooms in with the mousewheel, this then runs the update code many times, so after zooming it continues to calculate all the old updates, change the data, then throw it away again for several seconds. I believe that respecting the LODStart and LODEnd events I should be able to fix this trivially, however I can’t work out how to find the LOD status in the python side - the only way I can find to get it is to subscribe to the LODStart and LODEnd in the JS side, and send that back through something like a dummy CDS or non-rendered checkbox. Is there any nicer way?
Thanks
Sam

⌁   Link to post
Bryan
Bryan

The events_app.py example shows how register for all the available events in both Python and JS, including the LOD events:

⌁   Link to post
samr85
samr85

Thank you! Sorry for asking such a basic question - for some reason auto-complete in VSCode was showing me on_change, js_on_change and js_on_event, but wasn’t showing that on_event was a function!

⌁   Link to post
samr85
samr85

Thank you! not 100% sure what you mean, but have put a link here in the issue. I’d also updated it yesterday with my guess at what the issue was, and some possible fixes - I’m happy to do a pull request to fix it myself if you’d let me know if any of my suggestions are acceptable.

⌁   Link to post

End of archived discussion · Replies are disabled