]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
If setLineDash is not available, do not set it. 1404/head
authorEvert Timberg <evert.timberg@gmail.com>
Sat, 22 Aug 2015 20:13:19 +0000 (16:13 -0400)
committerEvert Timberg <evert.timberg@gmail.com>
Sat, 22 Aug 2015 20:13:19 +0000 (16:13 -0400)
src/elements/element.line.js

index c03f066848aa069230415a1b9e9964b30505dc17..62c316c959bebf546603cab4f612250fb9f21d48 100644 (file)
 
                        // Now draw the line between all the points with any borders
                        ctx.lineCap = vm.borderCapStyle || Chart.defaults.global.elements.line.borderCapStyle;
-                       ctx.setLineDash(vm.borderDash || Chart.defaults.global.elements.line.borderDash);
+                       
+                       // IE 9 and 10 do not support line dash
+                       if (ctx.setLineDash) {
+                               ctx.setLineDash(vm.borderDash || Chart.defaults.global.elements.line.borderDash);
+                       }
+
                        ctx.lineDashOffset = vm.borderDashOffset || Chart.defaults.global.elements.line.borderDashOffset;
                        ctx.lineJoin = vm.borderJoinStyle || Chart.defaults.global.elements.line.borderJoinStyle;
                        ctx.lineWidth = vm.borderWidth || Chart.defaults.global.defaultColor;