Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Hover event does not contain points


I need the x-axis values, when hovering over my plotly chart. According to the plotly docs ( the hover event callback should contain the field “points” from which I should get the x value.

But if you look at this basic example you can see that the callback does not contain the field “points”. Also other fields like “data” are undefined:

What am I doing wrong? :slight_smile:

Thanks in advance,


Using jQuery syntax, the first argument in the event callback is the jQuery event object, the second is the plotly event data:

 tester.on('plotly_hover', function(_, data){

should work as intended.

1 Like

Awesome, thank you, Etienne!
That saved my day :+1: