]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Refactored out property
authorTore Lervik <tore@lervik.com>
Mon, 21 Dec 2015 22:37:09 +0000 (23:37 +0100)
committerTore Lervik <tore@lervik.com>
Mon, 21 Dec 2015 22:37:09 +0000 (23:37 +0100)
src/core/core.scale.js

index 2ef412ba306299e9f765143922b0984f12f0dfa5..32c63922bed79f7eedb64b5d746b63f0d7044379 100644 (file)
@@ -47,6 +47,7 @@
                        reverse: false,
                        display: true,
                        autoSkip: true,
+                   autoSkipPadding: 20,
                        callback: function(value) {
                                return '' + value;
                        },
                                        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) {