d3-scale icon indicating copy to clipboard operation
d3-scale copied to clipboard

Weighted band scales?

Open Fil opened this issue 5 years ago • 1 comments

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).

Capture d’écran 2020-01-20 à 21 34 51

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.

Fil avatar Jan 20 '20 20:01 Fil

Related : weighted quantiles @ https://github.com/d3/d3-array/issues/47

Fil avatar Jun 25 '20 19:06 Fil