Skip to content
  • Mike Bostock's avatar
    Consistent SI-prefix for small numbers. · 621558c2
    Mike Bostock authored
    For reasons that I can’t recall, the SI-prefix behavior was different for small
    numbers (between -1 and 1) than it was for large numbers. This commit enforces
    consistent behavior, so that the coefficient is always in the range [1, 1000),
    like in engineering notation.
    
    For example, the old d3.format("s") would display 0.01 as "0.01", whereas the
    new behavior displays it as "10m".
    621558c2