Created
August 8, 2022 05:20
-
-
Save jgoodie/81f94f4f8b002e37dc4aeb6e547472a8 to your computer and use it in GitHub Desktop.
Append the svg object to the body of the page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// append the svg object to the body of the page | |
const svg = d3.select("body") | |
.append("svg") | |
.attr("width", width + margin.left + margin.right) | |
.attr("height", height + margin.top + margin.bottom) | |
.append("g") | |
.attr("transform", `translate(${margin.left},${margin.top})`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment