d3-scale
d3-scale copied to clipboard
Weighted band scales?
https://observablehq.com/d/29c9777318a8d5d5 shows how we could extend d3.scaleBand with a .weights() method allowing to set variable band widths (instead of uniform).
I might be missing something though. Note that I fiddled with the code quite a bit so I'm not sure it's still valid for uniform band scales, but if we want to integrate this I would rewrite that part.
[EDITED] changed widths to weights, which is an accessor.
Related : weighted quantiles @ https://github.com/d3/d3-array/issues/47