]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Category Scale now plays nice with full width
authorTanner Linsley <tannerlinsley@gmail.com>
Tue, 27 Oct 2015 08:33:34 +0000 (02:33 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Tue, 27 Oct 2015 08:33:34 +0000 (02:33 -0600)
src/scales/scale.category.js

index 039a9bef67490625b43f9ea00a7868a80d1d2b37..e3441bb20a9f81c2d5428703263fb4deb68074ef 100644 (file)
@@ -30,7 +30,7 @@
                     widthOffset += (valueWidth / 2);
                 }
 
-                return this.left + Math.round(widthOffset);
+                return this.left + this.margins.left + Math.round(widthOffset);
             } else {
                 var innerHeight = this.height - (this.paddingTop + this.paddingBottom);
                 var valueHeight = innerHeight / Math.max((this.data.labels.length - ((this.options.gridLines.offsetGridLines) ? 0 : 1)), 1);