Notes
Notes copied to clipboard
d3学习笔记
D3中常用的比例尺
摘要
domian
和range
配合实现比例映射
var scaleLinear = d3.scaleLinear().domain([100,200]).range([0, 400]);
console.log(scaleLinear(101),scaleLinear(200)); // 4 , 400
参考
https://segmentfault.com/a/1190000011006780