
Description
Expected behavior
I expect the chart canvas to remain an appropriate size when changing the zoom in the browser (Ctrl + Mousewheel).
Current behavior
The chart initially renders correctly, but then slowly shrinks toward its top-left corner until it disappears, then re-renders at its initial size. This loop repeats indefinitely.
Reproducible sample
https://codepen.io/leelenaleee/pen/WNyJXEe
Optional extra steps/info to reproduce
To reproduce, change the browser zoom to 90% (Ctrl + Mousewheel down).
The chart behavior is different at various zoom levels. At 110% zoom, for example, it only shrinks to a certain point and then stops.
Note that this bug is also active on the chart.js documentation site on every chart example.
This bug does not happen in Firefox 109.0 (64-bit), but it does happen in Google Chrome Version 109.0.5414.75 (Official Build) (64-bit).
Possible solution
No response
Context
No response
chart.js version
v4.2.0
Browser name and version
Google Chrome Version 109.0.5414.75 (Official Build) (64-bit)
Link to your project
No response