From a0c359ee8055ca3b26c7eefcd48e937c9a296909 Mon Sep 17 00:00:00 2001 From: Tore Lervik Date: Fri, 25 Dec 2015 13:53:09 +0100 Subject: [PATCH] min/max should have precedence over suggestedMin/suggestedMax --- src/scales/scale.linear.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scales/scale.linear.js b/src/scales/scale.linear.js index 68cbf2e0f..3adfd8bd5 100644 --- a/src/scales/scale.linear.js +++ b/src/scales/scale.linear.js @@ -129,16 +129,16 @@ } } - if (this.options.ticks.suggestedMin !== undefined) { - this.min = Math.min(this.min, this.options.ticks.suggestedMin); - } else if (this.options.ticks.min !== undefined) { + if (this.options.ticks.min !== undefined) { this.min = this.options.ticks.min; + } else if (this.options.ticks.suggestedMin !== undefined) { + this.min = Math.min(this.min, this.options.ticks.suggestedMin); } - if (this.options.ticks.suggestedMax !== undefined) { - this.max = Math.max(this.max, this.options.ticks.suggestedMax); - } else if (this.options.ticks.max !== undefined) { + if (this.options.ticks.max !== undefined) { this.max = this.options.ticks.max; + } else if (this.options.ticks.suggestedMax !== undefined) { + this.max = Math.max(this.max, this.options.ticks.suggestedMax); } if (this.min === this.max) { -- 2.47.2