From: Tore Lervik Date: Mon, 21 Dec 2015 22:37:09 +0000 (+0100) Subject: Refactored out property X-Git-Tag: 2.0.0-beta2~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d134394a1d7e7038667b75d4309f18b55c67827c;p=thirdparty%2FChart.js.git Refactored out property --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 2ef412ba3..32c63922b 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -47,6 +47,7 @@ reverse: false, display: true, autoSkip: true, + autoSkipPadding: 20, callback: function(value) { return '' + value; }, @@ -455,7 +456,7 @@ skipRatio = false; if ((this.options.ticks.fontSize * maxLength) * this.ticks.length > (this.width - (this.paddingLeft + this.paddingRight))) { - skipRatio = 1 + Math.floor((((this.options.ticks.fontSize * maxLength / 2) + (this.options.ticks.autoSkipPadding || 20)) * this.ticks.length) / (this.width - (this.paddingLeft + this.paddingRight))); + skipRatio = 1 + Math.floor((((this.options.ticks.fontSize * maxLength / 2) + this.options.ticks.autoSkipPadding) * this.ticks.length) / (this.width - (this.paddingLeft + this.paddingRight))); } if (!useAutoskipper) {