D3.js Case Study 筆記

d3.extent

可以快速地取出宜個陣列中的最小值跟最大值

通常會搭配著scale在使用

d3.extent ( [1,2,3,4,5] ) = [1,5]
d3.extent ( [1,2,-3,4,5] ) = [-3,5]