Scale expansion if min === max will only occur after ticks.beginAtZero is handled

This commit is contained in:
etimberg 2015-10-27 20:04:21 -04:00
parent 85572d7b67
commit 988034cef6

View File

@ -100,12 +100,6 @@
}, this); }, this);
} }
if (this.min === this.max) {
this.min--;
this.max++;
}
// Then calulate the ticks // Then calulate the ticks
this.ticks = []; this.ticks = [];
@ -144,6 +138,11 @@
// move the botttom down to 0 // move the botttom down to 0
this.min = 0; this.min = 0;
} }
}
if (this.min === this.max) {
this.min--;
this.max++;
} }
var niceRange = helpers.niceNum(this.max - this.min, false); var niceRange = helpers.niceNum(this.max - this.min, false);