Skip to content

Grouped marks (area and line) filter differently on different channels #760

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 Feb 15, 2022 · 0 comments · Fixed by #761
Closed

Grouped marks (area and line) filter differently on different channels #760

mbostock opened this issue Feb 15, 2022 · 0 comments · Fixed by #761
Labels
bug Something isn’t working

Comments

@mbostock
Copy link
Member

mbostock commented Feb 15, 2022

The area and line marks have special filtering behavior for their positional channels (x and y for line; x1, y1, x2, and y2 for area). If some of the x values are NaN, for example, you’ll get gaps:

Screen Shot 2022-02-15 at 2 48 33 PM

Here x is defined as:

d => d.unemployment < 14 ? d.date : NaN

However, if I do something similar with the stroke channel, the line will interpolate across missing values:

Screen Shot 2022-02-15 at 2 46 54 PM

Here stroke is defined as:

d => d.unemployment < 14 ? d.division : NaN

The latter seems like a bug: it would be preferable to show gaps if any of the values are missing for required channels rather than interpolating over the missing values. This is related to the desire to specify custom reducers for grouped values, rather than being limited to just showing the first value for each group. #724

@mbostock mbostock added the bug Something isn’t working label Feb 15, 2022
@mbostock mbostock changed the title Filtering on grouped marks (area and line) behaves differently depending on the channel Grouped marks (area and line) filter differently depending on the channel Feb 15, 2022
@mbostock mbostock changed the title Grouped marks (area and line) filter differently depending on the channel Grouped marks (area and line) filter differently on different channels Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant