chartjs / chartjs/Chart.js

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

Open
#11,804 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### 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](https://github.com/chartjs/Chart.js/assets/17402311/297ab369-54f7-4ed4-bdad-901020515ee0)

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.