From 1fdd661fe509e26515b3e8d66526c3f0ad29faf0 Mon Sep 17 00:00:00 2001 From: Ahmed Ali Date: Thu, 26 Jul 2018 15:09:48 +0200 Subject: [PATCH] Remove line on innerlabels --- src/classes.js | 1 + src/plugin.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/classes.js b/src/classes.js index 68782b4..f6bc44f 100644 --- a/src/classes.js +++ b/src/classes.js @@ -295,6 +295,7 @@ export default { this.center.copy.y += .5; } } + return innerLabel; }; this.moveLabelToOffset = function() { diff --git a/src/plugin.js b/src/plugin.js index 546933d..a4adf58 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -140,8 +140,8 @@ Chart.plugins.register({ } if (i < elements.length) { - label.update(el._view, elements, i); - label.drawLine(ctx); + const innerLabel = label.update(el._view, elements, i); + innerLabel || label.drawLine(ctx); } else { label.draw(ctx); }