Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip doesn't close when mouse leaves the chart area #11972

Open
hokolomopo opened this issue Dec 5, 2024 · 0 comments
Open

Tooltip doesn't close when mouse leaves the chart area #11972

hokolomopo opened this issue Dec 5, 2024 · 0 comments

Comments

@hokolomopo
Copy link

Expected behavior

The tooltip should be closed when the mouse is not hovering a chart element and is outside the chart area.

Current behavior

If a point is at the edge of the chart area and the mouse goes outside the chart area at the same time as it stops hovering the point, the tooltip stays open while the mouse is inside the canvas but outside the chart area.

Note where my mouse is in the screenshot and that the tooltip is still open.

image

Reproducible sample

https://www.chartjs.org/docs/latest/charts/line.html

Optional extra steps/info to reproduce

  1. Go on the sample page for line charts https://www.chartjs.org/docs/latest/charts/line.html
  2. Hover the left-most point of the chart
  3. Slightly move your mouse to the left, so it's still inside the canvas but outside the chart area, and not hovering the point
  4. The tooltip is still open. You can move your mouse all over the canvas while staying outside the chart area, and the tooltip will stay open.

Possible solution

No response

Context

The issue becomes quite visible and annoying if the chart have big margins between the edge of the canvas and the chart area (eg. big padding in layout, or long axis tick labels)

chart.js version

v4.4.7

Browser name and version

Chrome Version 129.0.6668.89

Link to your project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant