]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix a drawing bug when drawTicks is false.
authoretimberg <evert.timberg@gmail.com>
Tue, 19 May 2015 00:59:21 +0000 (20:59 -0400)
committeretimberg <evert.timberg@gmail.com>
Tue, 19 May 2015 00:59:21 +0000 (20:59 -0400)
samples/scatter-multi-axis.html
src/Chart.Scale.js

index 8d4658471d0d8f38fbd74ef7140268d729fd8440..30473a1ada92cce2e243db6d33a560fa03df9bd1 100644 (file)
@@ -95,6 +95,7 @@
             hoverMode: 'single',
             scales: {
                xAxes: [{
+                       position: "bottom",
                        gridLines: {
                                zeroLineColor: "rgba(0,0,0,1)"
                        }
index 3707597b6944925630e599fcd49267ad41b2b8d8..96897f671d2aad3b9ca8405cde4ef371728e9f23 100644 (file)
                                                        xValue += helpers.aliasPixel(this.ctx.lineWidth);
                                                        
                                                        // Draw the label area
-                                                       if (this.options.gridLines.drawTicks) {
-                                                               this.ctx.beginPath();
+                                                       this.ctx.beginPath();
+
+                                                       if (this.options.gridLines.drawTicks) { 
                                                                this.ctx.moveTo(xValue, yTickStart);
                                                                this.ctx.lineTo(xValue, yTickEnd);
                                                        }
                                                        yValue += helpers.aliasPixel(this.ctx.lineWidth);
 
                                                        // Draw the label area
+                                                       this.ctx.beginPath();
+                                                       
                                                        if (this.options.gridLines.drawTicks) {
-                                                               this.ctx.beginPath();
                                                                this.ctx.moveTo(xTickStart, yValue);
                                                                this.ctx.lineTo(xTickEnd, yValue);
                                                        }