From 990fd03153ebab6d540d74daa518a48d93352fbf Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Fri, 27 Mar 2020 20:23:14 -0400 Subject: [PATCH] Revert "Use round when setting new chart size (#7221)" (#7226) This reverts commit 8b01ab1326be8dead099cdb494e2efdc46ff4dbf. --- src/core/core.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 03dc499f5..9e3c5fd7a 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -313,8 +313,8 @@ export default class Chart { // the canvas display style uses the same integer values to avoid blurring effect. // Set to 0 instead of canvas.size because the size defaults to 300x150 if the element is collapsed - const newWidth = Math.max(0, Math.round(width)); - const newHeight = Math.max(0, Math.round(aspectRatio ? newWidth / aspectRatio : height)); + const newWidth = Math.max(0, Math.floor(width)); + const newHeight = Math.max(0, Math.floor(aspectRatio ? newWidth / aspectRatio : height)); // detect devicePixelRation changes const oldRatio = me.currentDevicePixelRatio; -- 2.47.2