☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to add doubletap tool in a bokeh plot

Community Supportcustomjsbokehjs
SAYANTAN_ADAK
SAYANTAN_ADAK

How can I create doubletap event on a glyph and use callback like OpenUrl for a bokeh plot?
By using TapTool I can use OpenUrl callback on clicking on a glyph but I am wondering is there any way to do the same using doubletap?

⌁   Link to post
SAYANTAN_ADAK
SAYANTAN_ADAK

Appreciating your response @Bryan . By using js_on_event callback I am able create a DoubleTap event in my network plot. By using cb_obj I can control the position(x, y, sx, sy) of the DoubleTap event. However I want to trigger the DoubleTap event only double-tapping over a glyph. After many trials I could not find a way to get the selected position of a glyph and I am stuck in it.
In my scenario I have a network plot with nodes and edges. I want to trigger the DoubleTap only after double-tapping on any node(a glyph). I am very very new to javascript. Any reference or example code will be really helpful.
P.S. I was able to achieve the same functionality for single tap using TapTool callback.

⌁   Link to post
Bryan
Bryan

I am afraid there is not any quick/easy way to achieve this currently. The DoubleTap event just tells you the location of the event, but does not do any hit-testing on glyphs. You could potentially do hit testing manually yourself, either in Python or JS, but neither case would a trivial undertaking, and I don’t have any example code to share for it. Conversely, the TapTool, which does do hit-testing on glyphs, is not currently configurable to respond to anything except double taps. It seems like it might be fairly easy to ad support for that, so please feel free to open a GitHub issue to propose it as a new feature.

⌁   Link to post

End of archived discussion · Replies are disabled