Close tooltips programmatically

I’m having an issue where the tooltips created by hoverinfo do not close when the mouse leaves the plot div. I’d like to programmatically clear out the tooltips which I could fire either on a mouseleave event or after a timeout.

I have tried

import * as Plotly from "plotly.js/dist/plotly";


// and

Plotly.relayout(gd, {hovermode: false});

neither of which closed the tooltips.

Does anyone know of a way to do this?

Hi. Have you solved this problem? Tell how, please

I have not solved this problem.


Plotly.Fx.unhover(gd, {});

hides all the currently visible hovered items for me.