Why does the tooltip show on the wrong point in scatter plot?


I have a scatter plot. When I hover over the points, the tooltips that show the values show up on the wrong point:


Is this a bug in Plotly? Is there any way to fix it?

Thank you.

Hi @gibran.shah, I actually doubt that’s a bug. It would have popped up quite a bit here if it was one.

Check your data for duplicates, that would be my guess.

On the contrary, I found this post here: Tool tip on wrong dot in scattergl - #2 by mmoskorz

It explains that I can set layout.hovermode to 'closest' to achieve the desired effect.

1 Like