From 5ca07b84f01f839a691d1d304cda641733471c2a Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Wed, 4 May 2016 21:06:19 -0400 Subject: [PATCH] Minor legend fix when going to next line --- src/core/core.legend.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/core.legend.js b/src/core/core.legend.js index a7ef76c68..b8ae19eb1 100644 --- a/src/core/core.legend.js +++ b/src/core/core.legend.js @@ -273,9 +273,9 @@ module.exports = function(Chart) { y = cursor.y; if (x + width >= legendWidth) { - cursor.y += fontSize + (labelOpts.padding); + y = cursor.y += fontSize + (labelOpts.padding); cursor.line++; - cursor.x = this.left + ((legendWidth - lineWidths[cursor.line]) / 2); + x = cursor.x = this.left + ((legendWidth - lineWidths[cursor.line]) / 2); } // Set the ctx for the box -- 2.47.3