Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

tonic + npm: d3-scale

node v4.9.1
version: 2.0.0
endpointsharetweet
var d3 = require("d3-scale") // Set the height to the actual value to where you want to shift the coords. // Most likely based on the size of the element it is contained within var height = 1; var y = d3.scaleLinear() .domain([0,1]) .range([height,0]); console.log("0 = " + y(0)); console.log("0.5 = " + y(0.5)); console.log("1 = " + y(1)); console.log("100 = " + y(100)); console.log("-100 = " + y(-100));
Created from: https://tonicdev.com/npm/d3-scale
Loading…

no comments

    sign in to comment