From: Ekaterina Dontsova Date: Fri, 2 Sep 2016 22:26:03 +0000 (+0300) Subject: Fix #3022 Multi-lines label alignment (#3239) X-Git-Tag: v2.3.0-rc.1~1^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6408ba426c60b84c8d60de428577e761589d2efb;p=thirdparty%2FChart.js.git Fix #3022 Multi-lines label alignment (#3239) --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 11ec187f5..ca2546b26 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -692,7 +692,7 @@ module.exports = function(Chart) { var label = itemToDraw.label; if (helpers.isArray(label)) { - for (var i = 0, y = 0; i < label.length; ++i) { + for (var i = 0, y = -(label.length - 1)*tickFontSize*0.75; i < label.length; ++i) { // We just make sure the multiline element is a string here.. context.fillText('' + label[i], 0, y); // apply same lineSpacing as calculated @ L#320