mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-12 22:35:51 +00:00
Clarify SVG selection in D3 example
This commit is contained in:
parent
4c51053011
commit
d85db4da1f
1 changed files with 2 additions and 2 deletions
|
|
@ -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>
|
||||
|
||||
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue