-
Notifications
You must be signed in to change notification settings - Fork 187
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
fix group domain #271
fix group domain #271
Conversation
Co-authored-by: Mike Bostock <mbostock@gmail.com>
for (const [y, fy] of groups(I, Y, ydefined, ydomain)) { | ||
for (const [x, f] of groups(fy, X, xdefined, xdomain)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve been thinking about this a little more, and I think it makes more sense that the corresponding scale’s domain drive which groups are shown, rather than needing to pass the domain explicitly to the group transform. I think this means that we should remove any filtering here, and just group all the data, and then we simply won’t show the resulting marks (e.g., bar will filter it out using maybeCoords).
This now intersects with the “grand unification” of group and reduce I’ve been working on, so I’ll try to merge these two PRs.
We’ll need to think through how to apply this more generally. This problem isn’t specific to bars — it applies whenever an ordinal scale is in play, which could be with any mark. |
superseded by #280 |
compute the scaled coordinates of bars (and cell) before filtering, allowing NaN, null and undefined as (ordinal) classes
groups respect the domain option
fixes #52
fixes #45
fixes #255