Hi,
I have added a models.HTMLLabel to my plot instance and I want to trigger a javascript callback whenever the user clicks on the label. The label position is (and must be) defined in screen coordinates. How can this be implemented?
What I tried to so far is register an events.Tap via plot.js_on_event(…) and then infer whether the cursor was over the label. Unfortunately, this is tricky, because for this I’d need to know the position of the axis area within the overall plot frame and this information seems not accessible via javascript. However, I suspect that there is an easier solution anyway.
Any help is much appreciated. I can provide a minimal example if desired, but perhaps the question is so simple that it is not necessary. I’m using the standalone variant, i.e. no Bokeh server.
Matthias