Blur and unblur events with line connections

Hi guys,
I’m using the Plotly library for 3D Scatter Plots in JavaScript. I want to use hover and unhover events on the chart. Specifically, when I blur over a point on the chart, I want to connect that point to another point with a line. Additionally, when I unblur from that point, the line should automatically disappear. I tried using the plotly_hover and plotly_unhover events, but I noticed that these events are being triggered multiple times.
Many thanks for any help!