]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Barheight no longer undefined (#9208)
authorJacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
Wed, 2 Jun 2021 19:48:42 +0000 (21:48 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Jun 2021 19:48:42 +0000 (22:48 +0300)
src/controllers/controller.bar.js

index bec996ac1de8951de547295ad37d970ea24366e8..d7daa6e8430c2608668739fb573e2ff0431c62ea 100644 (file)
@@ -285,8 +285,8 @@ export default class BarController extends DatasetController {
         enableBorderRadius: !stack || isFloatBar(parsed._custom) || (me.index === stack._top || me.index === stack._bottom),
         x: horizontal ? vpixels.head : ipixels.center,
         y: horizontal ? ipixels.center : vpixels.head,
-        height: horizontal ? ipixels.size : undefined,
-        width: horizontal ? undefined : ipixels.size
+        height: horizontal ? ipixels.size : Math.abs(vpixels.size),
+        width: horizontal ? Math.abs(vpixels.size) : ipixels.size
       };
 
       if (includeOptions) {