scale using d3 functions