Javascript callback for a change of active tool (e.g. RangeTool) in the plot toolbar

Hi @ori

If you’re willing to work at a lower level, there is quite a bit more flexibility in what you can achieve, generally speaking.

I’ve on a few occasions had to customize existing bokeh models to support application specific requirements most recently implementing a custom extension to the Bokeh Div model as outlined in the typescript and Python at the end of this Bokeh discourse topic. https://discourse.bokeh.org/t/layout-guidelines-tips-for-rapidly-rendering-many-plots/5119/16.

I think the place to start is the Bokeh user’s documentation section on extending Bokeh, here. https://docs.bokeh.org/en/latest/docs/user_guide/extensions.html

In addition to my example for a Div model, there’s also an example in the Bokeh documentation for extending a plot tool, here, which is at least conceptually a little bit closer to probably what you want.https://docs.bokeh.org/en/latest/docs/user_guide/extensions_gallery/tool.html

At the end, I think it comes down to familiarizing yourself with the particular model that you want to change, writing Typescript or Javascript supporting code, and a Python tool or model class which is typically a pretty minimal interface.

If you have specific questions that the devs or expert users will likely offer valuable help/direction.

Cheers,

J

1 Like