Skip to content

Instantly share code, notes, and snippets.

@flowck
Created August 1, 2019 22:38
Show Gist options
  • Save flowck/5b0a5e3b8738942d3721ed21486236da to your computer and use it in GitHub Desktop.
Save flowck/5b0a5e3b8738942d3721ed21486236da to your computer and use it in GitHub Desktop.
/**
* setScales: Will set the scales based in the type
* of the date
*/
setScales() {
// x axis scale
this.scales.x = d3
.scaleLinear()
.domain([0, 100])
.range([0, this.size.width]);
// y axis scale
this.scales.y = d3
.scaleLinear()
.domain([0, 100])
.range([this.size.height, 0]);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment