Fix #3022 Multi-lines label alignment (#3239)

This commit is contained in:
Ekaterina Dontsova 2016-09-03 01:26:03 +03:00 committed by Simon Brunel
parent a42f3e786e
commit 6408ba426c

View File

@ -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