I want to append an svg image in a html document using d3.js but I don't know why it is not working.
Here's what I wrote in my hello.js:
const w = 600;
const h = 600;
let dataset = [];
let x;
let y;
//Creating SVG Element
let svg = d3.select("body").append("svg").attr("width",
w).attr("height", h);
index.html
<html>
<head>
<meta charset="utf-8">
<title>Hello, D3</title>
<script type="text/javascript" src="js/d3/d3.js"></script>
<script type="text/javascript" src="js/hello.js"></script>
</head>
<body>
</body>
</html>
When I view the source code of my page, I can see that the svg was not created.
I'm using simpleHTTPServer to create a local server and then load my page so I don't think that the browser blocked the script.
EDIT: here's what I see when I inspect the page inspect page