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

index bacf699344008bf76263411ebfe07951c43b7933..67bbde436dc82e1e9a1e799931ac51343b3838a7 100644 (file)
                        if (this.isHorizontal()) {
 
                                var innerWidth = this.width - (this.paddingLeft + this.paddingRight);
-                               pixel = this.left + (innerWidth / range * (rightValue - this.start));
+                               pixel = this.left + this.margins.left + (innerWidth / range * (rightValue - this.start));
                                return Math.round(pixel + this.paddingLeft);
                        } else {
                                var innerHeight = this.height - (this.paddingTop + this.paddingBottom);