Last active
May 2, 2018 16:12
-
-
Save jarrettmeyer/47f5a59c2014fd270878d11adea803f6 to your computer and use it in GitHub Desktop.
This file contains 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
// Define constants. | |
const width = 800; | |
const height = 500; | |
const padding = { top: 20, bottom: 20, left: 20, right: 20 }; | |
// Define our SVG canvas. | |
let svg = d3.select("svg"); | |
let width = +svg.attr("width") - padding.left - padding.right; | |
let height = +svg.attr("height") - padding.top - padding.bottom; | |
svg.append("g").attr("transform", "translate(" + padding.left + ", " + padding.top ")"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment