I didn’t find information about if Bokeh allows a user to connect two nodes interactively dragging a line from one node to another.
Is there such a feature, event? I could add an event handler to create an edge on a server side.
I didn’t find information about if Bokeh allows a user to connect two nodes interactively dragging a line from one node to another.
Is there such a feature, event? I could add an event handler to create an edge on a server side.
@kvdm.dev you can respond to UI events (e.g. pan/drag) either JS or Python callbacks (if a Bokeh server application). Docs for JS callbacks for UI events are here:
but pretty much everything there applies to Python callbacks in a Bokeh server app, with js_on_event
replaced by on_event
.
Note: that is a link specifically to the 2.4.3 docs rather than “latest”, since the User’s Guide is about to be completely restructured with the upcoming 3.0 release.
Ok. And how would you recommend to update a UI component from a server side after handling an event?
automatically push server-side updates to the UI (i.e. widgets or plots in a browser)
https://docs.bokeh.org/en/2.4.3/docs/reference/server.html
Is it automatic?
Synchronization of all Bokeh model properties is automatic, and the UI will be update as appropriate. So, e.g. assign slider.value = new_value
and the slider will update.
There is lots of information in the docs:
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.