d3 / d3

Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:

Home Page:https://d3js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

d3 v6 is not supported in IE 11

pankajupadhyay29 opened this issue · comments

D3 V6 is not working in IE11 because of arrow functions, it failed with syntax error as below
image
To reproduce this just create a simple example page like

<html>
<head>
<script src="https://d3js.org/d3.v6.js"></script>
<script>
function onLoad() {
	console.log(d3);
	d3.select("body").style("background-color", "black");
	d3.select("body").style("color", "white");
}
</script>
</head>
<body onload="onLoad()">
Hello
</body>
</html>

This is intentional. d3@6 uses ES2015

You need to stick with v5 or transpile if you still need to support IE, which is not supported by Microsoft anymore.