From e46420e595edaf2c3eae5c220e3864fb01a03f09 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:40:16 -0700 Subject: [PATCH] Cleaner handling of fitting no ticks (#7212) --- src/core/core.scale.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 94c21f6f0..606bf0cd6 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -726,7 +726,7 @@ export default class Scale extends Element { } // Don't bother fitting the ticks if we are not showing the labels - if (tickOpts.display && display) { + if (tickOpts.display && display && me.ticks.length) { const labelSizes = me._getLabelSizes(); const firstLabelSize = labelSizes.first; const lastLabelSize = labelSizes.last; -- 2.47.2