Show dropdown on right click over line in bokeh

Hey All,

We are using bokehjs with react to generate lines over tile plot. Now we want to display a custom dropdown on a right click event.

Any way to trigger the right click event and display a dropdown in bokeh?

Regards
You know bokeh

Nothing is impossible, but there is nothing built-in to Bokeh to display widgets on top of a plot’s raster canvas, and I don’t think it would be trivial. I’ve never actually done it or seen it done, so I can only outline a possible sketch: A click event can report the plot frame screen coordinates to a CustomJS callback, these coordinates would need an adjusted to be relative to the canvas origin. Then you would need to display a dropdown of your own at those DOM coordinates (not a Bokeh one, e.g. you would need to hook up standard JS event handling for whatever widget you use for it to be able to do anything)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.