Rewrite of d3.scale.linear to work as an independent module