]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Do not draw line up on first point of line
authorTanner Linsley <tannerlinsley@gmail.com>
Tue, 27 Oct 2015 01:24:48 +0000 (19:24 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Tue, 27 Oct 2015 01:24:48 +0000 (19:24 -0600)
src/elements/element.line.js

index 73690d06d1b4d256c3ee944a314e27573a8a1d47..f094dea6ee3f0782e16fa44a20eb9ed0fae24efb 100644 (file)
                                        return;
                                }
 
+                               // If First point, move to the point ahead of time (so a line doesn't get drawn up the left axis)
+                               if (!index) {
+                                       ctx.moveTo(point._view.x, point._view.y);
+                               }
+
                                // Draw a bezier line to the point
                                if (vm.tension > 0 && index) {
                                        ctx.bezierCurveTo(