]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixed bug with skipRatio check not being triggered correctly. 1827/head
authorTore Lervik <tore@lervik.com>
Wed, 23 Dec 2015 12:42:24 +0000 (13:42 +0100)
committerTore Lervik <tore@lervik.com>
Wed, 23 Dec 2015 12:42:24 +0000 (13:42 +0100)
src/core/core.scale.js

index 1f3f624b5233c03cc4331a50cdd0e438cf2f24f1..d28fc56b70fc699547c69ba9a962a6ae641db435 100644 (file)
                                        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)));
                                        }