]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix padding for labels (#7572)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Mon, 6 Jul 2020 13:34:56 +0000 (06:34 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2020 13:34:56 +0000 (09:34 -0400)
src/core/core.scale.js

index 898413a481f308bf9ccfb995cc759dc67498a78d..1212f187b232ae24ed24d134695c28c7a267f622 100644 (file)
@@ -779,8 +779,8 @@ export default class Scale extends Element {
 
                                minSize.width = Math.min(me.maxWidth, minSize.width + labelWidth);
 
-                               me.paddingTop = firstLabelSize.height / 2;
-                               me.paddingBottom = lastLabelSize.height / 2;
+                               me.paddingTop = lastLabelSize.height / 2;
+                               me.paddingBottom = firstLabelSize.height / 2;
                        }
                }