]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixed label padding not affecting x-axis label 1485/head
authorBen Woodford <ben@woodfordnet.co.uk>
Thu, 24 Sep 2015 15:02:58 +0000 (16:02 +0100)
committerBen Woodford <ben@woodfordnet.co.uk>
Thu, 24 Sep 2015 15:02:58 +0000 (16:02 +0100)
src/scales/scale.category.js

index 5ba78e2d6644547970bb07e4650ef894da673601..188bf83aa32f83506c464325f3a19efd6f33d67c 100644 (file)
 
                         if (this.options.labels.show) {
                             this.ctx.save();
-                            this.ctx.translate(xLabelValue, (isRotated) ? this.top + 12 : this.top + 8);
+                            this.ctx.translate(xLabelValue, (isRotated) ? this.top + 12 + this.options.labels.padding : this.top + this.options.labels.padding);
                             this.ctx.rotate(helpers.toRadians(this.labelRotation) * -1);
                             this.ctx.font = this.font;
                             this.ctx.textAlign = (isRotated) ? "right" : "center";