From: Evert Timberg Date: Thu, 5 May 2016 01:06:19 +0000 (-0400) Subject: Minor legend fix when going to next line X-Git-Tag: v2.1.1~4^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ca07b84f01f839a691d1d304cda641733471c2a;p=thirdparty%2FChart.js.git Minor legend fix when going to next line --- 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