Update graphs on hover documentation example

Hi all, quick question regarding the “Update Graphs on Hover”-Example (https://dash.plot.ly/interactive-graphing):

The line charts update as soon as you hover over a scatter point, which is great. But when I move the cursor off that point, the line charts will still show the data for that point. Here is my question:

What if I wanted to have a “default” view of the line charts (say the average across all countries), which is displayed if I am not currently hovering over any given point? Is there a property or something to set hoverData = None as soon as the cursor isnt on any point?

Thanks

In case anyone else comes across this, dcc.Graph has a "clear_on_unhover " argument which will take care of this.

3 Likes