d3/d3-scale

Differences in scaleLinear between v4 and v5

791106912 opened this issue · 1 comments

d3.v5.js

   const extent = [0, 0]
   const scale = scaleLinear()
      .domain(extent)
      .range([200, 0]);
    scale(0)  // return 100

d3.v4.js

   const extent = [0, 0]
   const scale = scaleLinear()
      .domain(extent)
      .range([200, 0]);
    scale(0)  // return 200

So, How do I use v5 to achieve the effect of v4. Thank you.

Fil commented

You would have to test it in your application explicitly. This change happened in #117