chartjs / chartjs/Chart.js

Chart Datapoint hovers with body zoom

Open
#10,876 10 comments 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

Datapoints in Charts can be hovered and show tooltip with the data of the point
When using css property "zoom" on body-tag then the mouse over should work without problem

### Current behavior

Currently the mouseover is shifted when zooming in or out with the body-zoom-property.

### Reproducible sample

https://www.chartjs.org/samples/2.6.0/charts/bar/vertical.html

### Optional extra steps/info to reproduce

Works with every sample:
https://www.chartjs.org/samples/2.6.0/charts/bar/vertical.html

Just add to the body tag "zoom:80%" for example with code inspector in browser

### Possible solution

_No response_

### Context

User can't use hover function to get the data of the datapoint. This is a problem when user wants zoomed in or out but still wants to use chart function

### chart.js version

3.9.2

### Browser name and version

Safari 16.1

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