Plotly 5.14.0, Python 3.10.6, Ubuntu 22.04, running in Jupyter Notebook
I am following the example described here:
When I click on the image, I need to capture the coordinates of the click and use them in the app. I have
.on_click(self.click_handler) set on the figure, it gets the mouse click events. That works well. But the hover pop-up follows the mouse, I do not need it, and it’s quite annoying because it covers the part of the image I need to see (right under the mouse). I’ve tried to disable it but nothing seems to work.
Here’s an example that’s equivalent to my code:
import plotly.graph_objects as go import plotly.express as px zzz = go.FigureWidget() zzz_trace = px.imshow(np.zeros((100, 100), dtype=np.uint8)).data zzz.add_trace(zzz_trace) zzz.update_traces(hoverinfo="none") # zzz.update_traces(hovertemplate=) zzz
hoverinfo="skip" do not disable the pop-up.
hovertemplate= disables the pop-up, but also kills the mouse click event capturing. The widget does not react to mouse clicks anymore.
This is how the pop-up looks like:
How do I kill the popup without disabling click event tracing?