Revert "fix: Avoid reassigning the the chart size. For specific values of pixelRatio the assignment would cause the size to reduce by 1px. Since it's called from the ResizeObserver it will be stuck in a loop that constantly reduce the size of the chart and canvas."

This reverts commit ed7a34814d.
This commit is contained in:
Guy Baron 2022-12-16 16:38:05 -05:00
parent 3d10a16663
commit f70d6afcc2

View File

@ -222,6 +222,9 @@ export function retinaScale(
const deviceHeight = Math.floor(chart.height * pixelRatio);
const deviceWidth = Math.floor(chart.width * pixelRatio);
chart.height = deviceHeight / pixelRatio;
chart.width = deviceWidth / pixelRatio;
const canvas = chart.canvas;
// If no style has been set on the canvas, the render size is used as display size,