From 29801da9f5866129f3d3cb8e37f86618634e55a3 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 30 Dec 2019 13:54:13 -0600 Subject: [PATCH] Improved getMaxOverflow (#6874) --- src/controllers/controller.line.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/controller.line.js b/src/controllers/controller.line.js index 5277d9cb0..0e5317109 100644 --- a/src/controllers/controller.line.js +++ b/src/controllers/controller.line.js @@ -149,11 +149,11 @@ module.exports = DatasetController.extend({ _getMaxOverflow: function() { const me = this; const meta = me._cachedMeta; + const border = me._showLine && meta.dataset.options.borderWidth || 0; const data = meta.data || []; if (!data.length) { - return false; + return border; } - const border = me._showLine && meta.dataset.options.borderWidth || 0; const firstPoint = data[0].size(); const lastPoint = data[data.length - 1].size(); return Math.max(border, firstPoint, lastPoint) / 2; -- 2.47.2