From: Evert Timberg Date: Sat, 28 Mar 2020 00:23:14 +0000 (-0400) Subject: Revert "Use round when setting new chart size (#7221)" (#7226) X-Git-Tag: v3.0.0-beta.2~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=990fd03153ebab6d540d74daa518a48d93352fbf;p=thirdparty%2FChart.js.git Revert "Use round when setting new chart size (#7221)" (#7226) This reverts commit 8b01ab1326be8dead099cdb494e2efdc46ff4dbf. --- 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;