scales
v0.1.1
Published
Arbirtary scale functions, like in d3
Downloads
11
Readme
Scales
Quantitative scales, as found in d3.
Currently implemented the basics of linear and power scales, as per the d3 docs.
var scales = require('scales');
var scale = scales.linear()
.domain([-100, 100]) //input domain
.range([0, 10]); //output range
scale(-100) // -> 0
scale(0) // -> 5
scale(100) // -> 10
License
MIT