From 988034cef6b83b5e8e6574cddf8e14e7be4fb3cf Mon Sep 17 00:00:00 2001 From: etimberg Date: Tue, 27 Oct 2015 20:04:21 -0400 Subject: [PATCH] Scale expansion if min === max will only occur after ticks.beginAtZero is handled --- src/scales/scale.linear.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/scales/scale.linear.js b/src/scales/scale.linear.js index bacf69934..78c02a2ea 100644 --- a/src/scales/scale.linear.js +++ b/src/scales/scale.linear.js @@ -100,12 +100,6 @@ }, this); } - if (this.min === this.max) { - this.min--; - this.max++; - } - - // Then calulate the ticks this.ticks = []; @@ -144,6 +138,11 @@ // 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);