Skip to content

Implicitly stack barY when specified as {x, y} (not {x, y1, y2}) #315

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

Closed
mbostock opened this issue Apr 9, 2021 · 2 comments
Closed

Implicitly stack barY when specified as {x, y} (not {x, y1, y2}) #315

mbostock opened this issue Apr 9, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

mbostock commented Apr 9, 2021

The current behavior for barY is overlapping bars when specified as {x, y} since this is equivalent to {x, y1 = 0, y2 = y}. If the bars (or areas) are opaque, this can obscure the data. Perhaps we could have implicit stacking by default, such that if the barY is specified as {x, y} (i.e. if y1 and y2 are undefined) then we implicitly apply the stackY transform to create them. And you could always opt-out of stacking by explicitly setting y1 to zero if desired (maybe we could allow y1 to be specified as a constant number, so that y1: 0 works).

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

Fil commented Apr 21, 2021

I'd say it's fine as it is at this "lower" level, but it should definitely be here by default in a higher-level "Histogram component". Same maybe for a stacked area chart, which should include the seriesX transform (#325) by default.

@Fil
Copy link
Contributor

Fil commented May 10, 2021

duplicate of #348, fixed in c78e706

@Fil Fil closed this as completed May 10, 2021
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

No branches or pull requests

2 participants