From: Tanner Linsley Date: Fri, 28 Aug 2015 21:12:35 +0000 (-0600) Subject: Don't account for paddingLeft until after rotated X-Git-Tag: 2.0.0-alpha4~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bade753fe3a476fdadc6f1f2196e001964846759;p=thirdparty%2FChart.js.git Don't account for paddingLeft until after rotated --- diff --git a/src/scales/scale.category.js b/src/scales/scale.category.js index 7912f8dcb..38a69c92e 100644 --- a/src/scales/scale.category.js +++ b/src/scales/scale.category.js @@ -126,7 +126,7 @@ var datasetWidth = Math.floor(this.getPixelForValue(0, 1) - this.getPixelForValue(0, 0)) - 6; //Max label rotation can be set or default to 90 - also act as a loop counter - while (this.labelWidth > (datasetWidth + this.paddingLeft) && this.labelRotation <= this.options.labels.maxRotation) { + while (this.labelWidth > datasetWidth && this.labelRotation <= this.options.labels.maxRotation) { cosRotation = Math.cos(helpers.toRadians(this.labelRotation)); sinRotation = Math.sin(helpers.toRadians(this.labelRotation));