Last active
September 4, 2021 21:36
-
-
Save russelllim22/2c06ef6c1374a7370b15391c099bf6f0 to your computer and use it in GitHub Desktop.
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
let xScale = d3.scaleLinear() | |
.domain([0, 3000]) // my x-variable has a max of 3000 | |
.range([0, 600]); // my x-axis is 600px wide | |
let yScale = d3.scaleLinear() | |
.domain([0, 1000]) // my y-variable has a max of 1000 | |
.range([400, 0]); // my y-axis is 400px high | |
// (the max and min are reversed because the | |
// SVG y-value is measured from the top) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment