简体   繁体   中英

How to access Bokeh's data and trigger events on the front-end from outside?

I'd like to filter and save an embedded Bokeh plot's data dynamically, preserving the zoom too. It looks like Bokeh is a Backbone project and I am not sure how to access its data and call triggers on it from the outside. Function components() does not seem to render inputs for Bokeh and we'd need more functionality anyway.

Where could I look for examples? How would you solve this problem?

What I figured so far is the following:
CustomJS supplies cb_obj that sometimes has useful data such as selected indices from the drawn points. Combined with ColumnDataSource's source data one can trigger his JS application to pull ajax requests then source.trigger('change') refreshes the plot.
I still don't know how to properly access Bokeh's Backbone data models accross the board.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM