mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
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:
parent
3d10a16663
commit
f70d6afcc2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user