from bokeh.plotting import figure from bokeh.events import Tap p = figure(...) p.js_on_event(Tap, CustomJS(args = args, code = js_code))
cb_obj.x in the
Is there a way to get the x-value of the closest data point which is currently hovered? Of course this would only work if hovering is enabled and when the mouse pointer is close enough to a data point.
In a JS callback from
CustomJSHover, there is the
special_vars variable which provides the coordinates of the hovered data point with the
data_x property. However, it seems that
special_vars is not available in the CustomJS callback of a