Skip to content

karlbohlmark/linear-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linear-scale

Linear scale component

Installation

	$ component install karlbohlmark/linear-scale

API

var Scale = require('linear-scale')

var scale = new Scale([0, 10], [0, 100])

scale.map(10) // -> 100
scale.invert(100) // -> 10

scale.scaleDomain(5)
scale.invert(100) // -> 50

scale.scaleDomain(5)
scale.invert(100) // -> 10

License

MIT

About

Linear scale (similar to d3 scales)

Resources

Stars

Watchers

Forks

Packages

No packages published