g.bar.horizontal.js
authorleon <leon@roojs.com>
Wed, 2 Aug 2023 02:34:50 +0000 (10:34 +0800)
committerleon <leon@roojs.com>
Wed, 2 Aug 2023 02:34:50 +0000 (10:34 +0800)
g.bar.horizontal.js

index a0f7df6..02449df 100644 (file)
@@ -87,17 +87,15 @@ Roo = typeof(Roo) != 'undefined' ? Roo:  (imports ? imports.seed.Roo.Roo: {});
         if(max >= 100 && step % 10 != 0) {
             max = Math.ceil(step / 10) * 10 * bottomAxisStep;
         }
+        else if(max >= 50  && step % 5 != 0) {
+            max = Math.ceil(step / 5) * 5 * bottomAxisStep;
+        }
 
         // if(max >= 20  && stepWidth % 2 != 0) {
         //     stepWidth = Math.ceil(stepWidth / 2) * 2;
         //     max = stepWidth * bottomAxisStep;
         // }
 
-        // if(max >= 50  && stepWidth % 5 != 0) {
-        //     stepWidth = Math.ceil(stepWidth / 5) * 5;
-        //     max = stepWidth * bottomAxisStep;
-        // }
-
         // background
         paper.rect(0, 0, width, height).attr({ stroke: "none", fill: background });