I have a chart with x_axis_type=‘datetime’. I want the input of x-axis from the user such that when he doubletaps on the chart, the x-axis value of the point at which he does that is taken as input. What’s the way to do this? I do see an event ‘doubletap’ but I don’t know how to record the x-axis value according to the mouse’s position.
In a Python (bokeh server) callback, the callback receives an event
argument, and the values are attributes on that, e.g. event.x
. In a JS callback, the callback object cb_obj
is available and the attributes are on that, e.g. cb_obj.x
. There are examples using both in the repo:
-
events_app.py
– Bokeh server app, python callbacks -
js_events.py
– standalone output, JS callbacks