From: Tore Lervik Date: Wed, 23 Dec 2015 12:42:24 +0000 (+0100) Subject: Fixed bug with skipRatio check not being triggered correctly. X-Git-Tag: 2.0.0-beta2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1827%2Fhead;p=thirdparty%2FChart.js.git Fixed bug with skipRatio check not being triggered correctly. --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 1f3f624b5..d28fc56b7 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -460,7 +460,7 @@ var yTickEnd = this.options.position === "bottom" ? this.top + 10 : this.bottom; skipRatio = false; - if ((longestRotatedLabel + rotatedLabelHeight) * this.ticks.length > (this.width - (this.paddingLeft + this.paddingRight))) { + if (((longestRotatedLabel / 2) + this.options.ticks.autoSkipPadding) * this.ticks.length > (this.width - (this.paddingLeft + this.paddingRight))) { skipRatio = 1 + Math.floor((((longestRotatedLabel / 2) + this.options.ticks.autoSkipPadding) * this.ticks.length) / (this.width - (this.paddingLeft + this.paddingRight))); }