]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Don't account for paddingLeft until after rotated
authorTanner Linsley <tannerlinsley@gmail.com>
Fri, 28 Aug 2015 21:12:35 +0000 (15:12 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Fri, 28 Aug 2015 21:12:35 +0000 (15:12 -0600)
src/scales/scale.category.js

index 7912f8dcb06ca7497155f19a2c2086d0a5a19960..38a69c92e9e8829eee20b873283b3246f52b0860 100644 (file)
                 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));