Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted band scales? #202

Open
Fil opened this issue Jan 20, 2020 · 1 comment
Open

Weighted band scales? #202

Fil opened this issue Jan 20, 2020 · 1 comment

Comments

@Fil
Copy link
Member

Fil commented Jan 20, 2020

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 Fil changed the title variable band scales? Weighted band scales? Jan 21, 2020
@Fil
Copy link
Member Author

Fil commented Jun 25, 2020

Related : weighted quantiles @ d3/d3-array#47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant