From: Evert Timberg Date: Sat, 22 Aug 2015 20:13:19 +0000 (-0400) Subject: If setLineDash is not available, do not set it. X-Git-Tag: 2.0.0-alpha4~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1404%2Fhead;p=thirdparty%2FChart.js.git If setLineDash is not available, do not set it. --- diff --git a/src/elements/element.line.js b/src/elements/element.line.js index c03f06684..62c316c95 100644 --- a/src/elements/element.line.js +++ b/src/elements/element.line.js @@ -114,7 +114,12 @@ // 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;