Hi all,
I am currently upgrading my bokeh app from 0.12 to the most recent version, and have decided to switch to a server implementation. I have a side panel with lots of controls that allow to tweak the plot, these used to be managed cumbersomely using quite large CustomJS callbacks. I am now rewriting them into python callbacks. For Button or RadioButtonGroup there is the on_click function which allows to do:
UI_item=RadioButtonGroup(...)
def callback_UI_item(active):
#callback code here
UI_item.on_click(callback_UI_item)
My question is, how do I do the same for a HoverTool? In particular, I would like to do something like this, but it gives me an error (ValueError: expected an instance of type Callback, got <function callback_hover at 0x7fc9aa44c7b8> of type function):
p1=figure(...)
main_dataset=p1.circle(..., source=data_source)
def callback_hover(cb_data):
print(cb_data.Index)
hovertool=HoverTool(callback=callback_hover, renderers=[main_dataset])
p1.add_tools(hovertool)
TIA


