]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Scale expansion if min === max will only occur after ticks.beginAtZero is handled 1581/head
authoretimberg <evert.timberg@gmail.com>
Wed, 28 Oct 2015 00:04:21 +0000 (20:04 -0400)
committeretimberg <evert.timberg@gmail.com>
Wed, 28 Oct 2015 00:04:21 +0000 (20:04 -0400)
src/scales/scale.linear.js

index bacf699344008bf76263411ebfe07951c43b7933..78c02a2eac5835070890276b0fc2a5b42bc9ad73 100644 (file)
                                }, this);
                        }
 
-                       if (this.min === this.max) {
-                               this.min--;
-                               this.max++;
-                       }
-
-
                        // Then calulate the ticks
                        this.ticks = [];
 
                                        // move the botttom down to 0
                                        this.min = 0;
                                }
+                       } 
+
+                       if (this.min === this.max) {
+                               this.min--;
+                               this.max++;
                        }
 
                        var niceRange = helpers.niceNum(this.max - this.min, false);