From 68b00b2dc512b9041037c5f87fc28fcc7ac5b9fa Mon Sep 17 00:00:00 2001 From: etimberg Date: Fri, 4 Nov 2016 21:31:00 -0400 Subject: [PATCH] Labels can get bigger when the 2nd fit happens. Don't arbitrarily force the size to change --- src/core/core.scale.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index ce399219b..bc09cb0ae 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -353,7 +353,6 @@ module.exports = function(Chart) { me.paddingRight = me.labelRotation !== 0 ? (sinRotation * (tickFontSize / 2)) + 3 : lastLabelWidth / 2 + 3; // when rotated } else { // A vertical axis is more constrained by the width. Labels are the dominant factor here, so get that length first - var maxLabelWidth = me.maxWidth - minSize.width; // Account for padding var mirror = tickOpts.mirror; @@ -364,14 +363,7 @@ module.exports = function(Chart) { largestTextWidth = 0; } - if (largestTextWidth < maxLabelWidth) { - // We don't need all the room - minSize.width += largestTextWidth; - } else { - // Expand to max size - minSize.width = me.maxWidth; - } - + minSize.width += largestTextWidth; me.paddingTop = tickFontSize / 2; me.paddingBottom = tickFontSize / 2; } -- 2.47.3