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

feat: Expose react option for params #9374

Merged
merged 10 commits into from
Jul 28, 2024
Merged

feat: Expose react option for params #9374

merged 10 commits into from
Jul 28, 2024

Conversation

joelostblom
Copy link
Contributor

@joelostblom joelostblom commented Jun 20, 2024

PR Description

Currently the Vega-Lite schema does not officially support the use of the option react to params. It still works to use it in the online editor, but it raises an error when validating the spec in Altair. We want to use it to create a constant color domain like in this example originally from vega/altair#3394 (comment). Adding this functionality would allow us to have a constant color domain even when filtering which is very useful (and could even be a good default option for using the legend to filter colors). Without setting a constant domain, it is not possible to click additional categories since they disappear from the legend as described in #9360

close #9360

Checklist

  • This PR is atomic (i.e., it fixes one issue at a time).
  • The title is a concise semantic commit message (e.g. "fix: correctly handle undefined properties").
  • yarn test runs successfully
  • For new features:
    • Has unit tests.
    • Has documentation under site/docs/ + examples.

Copy link

cloudflare-pages bot commented Jun 20, 2024

Deploying vega-lite with  Cloudflare Pages  Cloudflare Pages

Latest commit: e247e4f
Status: ✅  Deploy successful!
Preview URL: https://204fb771.vega-lite.pages.dev
Branch Preview URL: https://react-params.vega-lite.pages.dev

View logs

@joelostblom
Copy link
Contributor Author

This is now ready for review and I updated the description in the original comment with more details.

@joelostblom
Copy link
Contributor Author

Thanks for the review @domoritz , just checking if I can merge this or if you left it open for someone else to have a look first?

@domoritz
Copy link
Member

This pull request just passes the signal property through: https://vega.github.io/vega/docs/signals/. Looks good.

@domoritz domoritz merged commit 93d92ef into main Jul 28, 2024
10 checks passed
@domoritz domoritz deleted the react-params branch July 28, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid filtering out entries from legends when the data is filtered via the legend
2 participants