Clarify SVG selection in D3 example

This commit is contained in:
T.P. van der Ven 2025-10-19 14:25:32 +02:00 • committed by GitHub
parent 4c51053011
commit d85db4da1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,7 @@ The first few lines of our JavaScript code are simple. To scale our element with
var width = vw;
// Create the canvas. We will use only part of it for the main plot
var svg = d3.select("#click") // This selects the div
var svg = d3.select("#click") // This selects the svg using its id
.attr("width", width) // This defines the canvas' width
.attr("height", height) // This defines the canvas' height
```
@ -853,4 +853,4 @@ Here is the code for the element above in full:
</html>
```
```