chartjs / Chart.js

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

A tooltip appears in the center of the chart on chart hover after hiding all data via legend click #11804

Open elenachiosa opened 3 weeks ago

elenachiosa commented 3 weeks ago

Expected behavior

No tooltip should appear because the chart is visually hidden.

Current behavior

A tooltip appears when the mouse pointer hovers in the center of the chart after all legend items are clicked (all data is hidden). image

Reproducible sample

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

Optional extra steps/info to reproduce

  1. Hide all data by clicking on all labels in the legend
  2. Hover in the center of the chart -> a tooltip will appear

Possible solution

No response

Context

No response

chart.js version

4.4.2

Browser name and version

Chrome 125.0.6422.147

Link to your project

No response