Custom The Scale Function In D3.js
I would like to map 1-1000 to 1-190, my map function is: f(x) = { x if 1<=x and x<=100, 100 + (x-100)/10 if 100 < x <= 1000
Solution 1:
Finally, got the solution by tracing the source code:
d3.scale.linear().domain([1, 100, 1000]).range([1, 100,190]) //poly-linear
Post a Comment for "Custom The Scale Function In D3.js"