-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Chart Datapoint hovers with body zoom #10876
Comments
Sorry tested version is the current stable 3.9.1 (not 3.9.2) |
Also your reproducable samples are not reproducable samples, they are just links to verry outdated samples of chart.js so please update them to a V4 reproducable sample |
I tried it with a copy of my project and the chart.js version 4.0.1 - it still happens. Here is a codepen sample: |
@simonsolutions I've plaied a bit with your codepen. Using FF, tooltip is showing correctly Instead it's not working with Chrome.
EDIT: cleaning cache of FF, the chart.js is correctly 4.0.1 |
And also not working with Safari beside chrome. |
I think the problem is related to DPR. |
Okay so it seems to be a problem |
In my opinion, CHART.JS is correctly using |
Has anyone found a solution to this problem with zooming? |
I tried from the div/canvas of the chart itself a style "zoom: 1 !important", what is sadly also not working. Is there any solution for the zoom problem? |
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
The text was updated successfully, but these errors were encountered: