-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
Expected behavior
When triggering some hover event in a chart, the expected behavior is just to keep the real size.
Current behavior
The charts are shrinking in size, similar to what was reported in #10951.
Reproducible sample
https://www.chartjs.org/docs/latest/samples/area/line-boundaries.html
Optional extra steps/info to reproduce
- install Zoom for Google Chrome
- visit https://www.chartjs.org/docs/latest/samples/area/line-boundaries.html
- enter
302.0639419555664to Zoom extension
2023-04-07.02-24-36.mp4
Possible solution
Limiting the value of pixelRatio to discrete values.
Context
On my Xperia 1 II running Chrome, I have noticed that whenever I visit a website that utilizes Chart.js, the charts are consistently shrinking in size. Upon setting "Brake on > attribute modifications" in the Chrome developer tools on the shrinking canvas element, I observed that the values stored in the variables within the retinaScale function are gradually decreasing.
Initially, I suspected a bug in the heatmap graph on Misskey, a recently popular distributed social networking service in Japan. However, I realized that the service was using Chart.js v4.2.1 (after #10971 was merged), which leads me to suspect that the issue lies with Chart.js itself.
chart.js version
v4.2.1
Browser name and version
Google Chrome 111.0.5563.147(Official Build)
Link to your project
No response