Skip to content

stackR transform? #197

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

Open
mbostock opened this issue Mar 8, 2021 · 1 comment · May be fixed by #502
Open

stackR transform? #197

mbostock opened this issue Mar 8, 2021 · 1 comment · May be fixed by #502
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

mbostock commented Mar 8, 2021

I could see a stackR transform which takes an r (radius) channel in and produces r1 and r2 output channels, which you would use in conjunction with an annulus type mark. Maybe the dot mark should allow r1 and r2 input channels and have similar behavior to barY’s y, y1, and y2 channels. The sqrt transform should ensure that the rings have area proportional to value.

@mbostock mbostock added the enhancement New feature or request label Mar 8, 2021
@Fil
Copy link
Contributor

Fil commented Mar 8, 2021

Ref. pie charts (#80 #85)

Fil added a commit that referenced this issue Aug 11, 2021
… by number of cylinders

The bins are sorted by decreasing r, so that they are all visible.

The example would benefit from stackR (#197).

It could also benefit from a strategy to create missing values for the line, so that it's broken when there are no data. However, it won't work with an approach such as "return empty bins" (#495), because returning empty bins will not create the *z* values for each and every category, which would be necessary if we wanted to create broken lines. This shows that a generic foolproof solution to #351 will require much more than #495 (and #489 and #491 are not better in that regard).
mbostock added a commit that referenced this issue Aug 11, 2021
* This example plot computes the median of cars' economy (mpg), grouped by number of cylinders

The bins are sorted by decreasing r, so that they are all visible.

The example would benefit from stackR (#197).

It could also benefit from a strategy to create missing values for the line, so that it's broken when there are no data. However, it won't work with an approach such as "return empty bins" (#495), because returning empty bins will not create the *z* values for each and every category, which would be necessary if we wanted to create broken lines. This shows that a generic foolproof solution to #351 will require much more than #495 (and #489 and #491 are not better in that regard).

* Update test/plots/cars-mpg.js

Co-authored-by: Mike Bostock <[email protected]>

* Update test/plots/cars-mpg.js

Co-authored-by: Mike Bostock <[email protected]>

* zero, not filter

* group, not bin

* remove console.log

* stroke, not fill

Co-authored-by: Mike Bostock <[email protected]>
@Fil Fil linked a pull request Aug 14, 2021 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants