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

field as a scale range is not added to group by of aggregation #7486

Closed
aplavin opened this issue May 22, 2021 · 2 comments · Fixed by #7576
Closed

field as a scale range is not added to group by of aggregation #7486

aplavin opened this issue May 22, 2021 · 2 comments · Fixed by #7576
Labels

Comments

@aplavin
Copy link

aplavin commented May 22, 2021

Docs (https://vega.github.io/vega-lite/docs/scale.html#range) say that color values can be taken directly from data:

For discrete and discretizing scales, an array of desired output values or an object with a field property representing the range values. For example, if a field color contains CSS color names, we can set range to {field: "color"}.

When I try this, nothing is shown in the plot: example. Data viewer suggests that the color field doesn't make it into the resulting dataset.

If I bind this field (color) to another property, everything suddenly works fine! Example.

As I undestand, both examples linked above are supposed to give the same result.

@domoritz
Copy link
Member

Yes, looks like we don't add the color field to the group by of the aggregation. Open the Chart in the Vega Editor.

@domoritz domoritz added Area - Data Flow Optimization P3 Should be fixed at some point labels May 22, 2021
@domoritz domoritz changed the title field as a scale range results in an empty plot field as a scale range is not added to group by of aggregation May 22, 2021
@aplavin
Copy link
Author

aplavin commented May 22, 2021

Thanks for clarification, indeed it does work without aggregates.

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