I have a bokeh plot where I need the user to interactively select a certain x-range. With this selection, I need to execute complex Python code - a CustomJS callback is not an option.
The BoxSelectTool seems perfect for this - from the look and feel of it, it is exactly what I need (See screenshot below).
According to the documentation, after finishing a selection, a custom callback can be invoked that tells me the selection range cb_data . However, I cannot find a way to pass that to a Python function - it looks like I can only add a CustomJS callback as callback.
What is the preferred way of passing the selection to custom Python code in Bokeh server? Is there any other tool that works like the BoxSelectTool ?
I managed to emulate the behaviour by activating the BoxSelectTool, ignoring it, and instead reading the raw data generated by the events (as documented here ):
It seems to have replied here in the topic correctly? If you were wanting to quote part of my reply you can do that by highlighting/selecting the text you want to quote first. Or there is a quote button in the reply editor you can use manually.