chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.9k stars 11.88k forks source link

The tooltip is still visible on legend item hover #11801

Open elenachiosa opened 3 weeks ago

elenachiosa commented 3 weeks ago

Expected behavior

The tooltip should be closed if I'm hovering on the legend item.

Current behavior

The tooltip sometimes stays open when I'm hovering the legend item.

image

Reproducible sample

https://codepen.io/teodorachiosa/pen/ZENJEKp

Optional extra steps/info to reproduce

The issue is easy to see on the Chart.js demo application. One very obvious example is this one:

  1. Go to: https://www.chartjs.org/docs/latest/samples/legend/events.html
  2. Hover over the "Red" pie slice
  3. Quickly hover over the legend item labeled "Green"

Current behavior: The "Red" tooltip is still visible. image

Possible solution

No response

Context

End users might start to confuse the wrong pie slice with the wrong label and value.

chart.js version

4.4.2 Also reproducing on 4.4.3

Browser name and version

Chrome 125.0.6422.147

Link to your project

No response