Created
August 8, 2022 19:37
-
-
Save jgoodie/22c8a484610b9ce332e5cec9d520c99d to your computer and use it in GitHub Desktop.
how to declare a scale object
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
// Add X axis | |
const x = d3.scaleLinear() | |
.domain([1.5, 5]) | |
.range([ 0, width ]); | |
// Add Y axis | |
const y = d3.scaleLinear() | |
.domain([3, 8.5]) | |
.range([ height, 0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment