From: Ben Woodford Date: Thu, 24 Sep 2015 15:02:58 +0000 (+0100) Subject: Fixed label padding not affecting x-axis label X-Git-Tag: 2.0.0-alpha4~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1485%2Fhead;p=thirdparty%2FChart.js.git Fixed label padding not affecting x-axis label --- diff --git a/src/scales/scale.category.js b/src/scales/scale.category.js index 5ba78e2d6..188bf83aa 100644 --- a/src/scales/scale.category.js +++ b/src/scales/scale.category.js @@ -303,7 +303,7 @@ 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";