]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Have to check for undefined because "if (0.0)" would equal false. 1814/head
authorTore Lervik <tore@lervik.com>
Mon, 21 Dec 2015 19:28:20 +0000 (20:28 +0100)
committerTore Lervik <tore@lervik.com>
Mon, 21 Dec 2015 19:28:20 +0000 (20:28 +0100)
src/scales/scale.linear.js

index d453b2c7e6557ada8781f290f528cf5c2edbacb5..68cbf2e0f96356fe0c2570cdcdad3fb6a971039e 100644 (file)
                                }
                        }
 
-                       if (this.options.ticks.suggestedMin) {
+                       if (this.options.ticks.suggestedMin !== undefined) {
                                this.min = Math.min(this.min, this.options.ticks.suggestedMin);
                        } else if (this.options.ticks.min !== undefined) {
                                this.min = this.options.ticks.min;
                        }
 
-                       if (this.options.ticks.suggestedMax) {
+                       if (this.options.ticks.suggestedMax !== undefined) {
                                this.max = Math.max(this.max, this.options.ticks.suggestedMax);
                        } else if (this.options.ticks.max !== undefined) {
                                this.max = this.options.ticks.max;