Black Lives Matter. Please consider donating to Black Girls Code today.

Plotly_hover strange behavior

On a scatter plot, I noticed the following:

  • I hover on a point and plotly_hover is fired
  • I leave the point and plotly_unhover is fired
  • I re-enter the same point and nothing is fired. (I was expecting plotly_hover to get called again.)

It seems that I have to hover over a different point, then go back to the original point in order to get its plotly_hover event to fire again.

Is this intentional?

As an example, say I wanted to just print a random number to the console every time I hovered over a point. Hovering over a point should print a random number. Leaving the point and re-entering should print a different random number. However, this doesn’t work because the second hover doesn’t seem to invoke plotly_hover.

Hello,
it is difficult to answer your question without seeing the code. I think I can’t reproduce the observed behaviour in my example: Hove and unhover works as expected. It is possible to enter the same point several times in a row.
See here on jsFiddle: https://jsfiddle.net/nm4c506q/

Can you provide your code? In best way as jsFiddle or codepen