From: Jukka Kurkela Date: Sat, 18 Jan 2020 00:05:51 +0000 (+0200) Subject: Fix clipping when zoomed (#6973) X-Git-Tag: v3.0.0-alpha~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e388134813936dd5958f5ef5872f4ed1485de1d;p=thirdparty%2FChart.js.git Fix clipping when zoomed (#6973) --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 81aaa9ceb..4317bbfbd 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -697,7 +697,6 @@ class Chart { const me = this; const ctx = me.ctx; const clip = meta._clip; - const canvas = me.canvas; const area = me.chartArea; const args = { meta: meta, @@ -710,9 +709,9 @@ class Chart { helpers.canvas.clipArea(ctx, { left: clip.left === false ? 0 : area.left - clip.left, - right: clip.right === false ? canvas.width : area.right + clip.right, + right: clip.right === false ? me.width : area.right + clip.right, top: clip.top === false ? 0 : area.top - clip.top, - bottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom + bottom: clip.bottom === false ? me.height : area.bottom + clip.bottom }); meta.controller.draw();