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: adding observable10 color scheme #3626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

apoorvkh
Copy link

@apoorvkh apoorvkh commented Oct 3, 2024

I saw that Vega supports the observable10 color scheme, which I think looks quite nice. It was added to Vega in: vega/vega#3843

I am adding this scheme to Altair's list as well.

Since, alt.Scale(scheme="observable10") currently raises a SchemaValidationError on altair==5.4.1.

@apoorvkh apoorvkh changed the title Adding observable10 color scheme feat: adding observable10 color scheme Oct 3, 2024
@apoorvkh
Copy link
Author

apoorvkh commented Oct 3, 2024

Ah, looks like that file is automatically generated by: https://github.com/vega/altair/blob/main/tools/generate_schema_wrapper.py

Before I dig further, is there any obvious reason that observable10 isn't included in the Python schema validation / typing file? Maybe Altair depends on an older version of the vega/vegalite schema?

@dangotbanned
Copy link
Member

Ah, looks like that file is automatically generated by: main/tools/generate_schema_wrapper.py

Before I dig further, is there any obvious reason that observable10 isn't included in the Python schema validation / typing file? Maybe Altair depends on an older version of the vega/vegalite schema?

Appreciate the PR @apoorvkh!

So I did a search of https://github.com/vega/altair/blob/main/altair/vegalite/v5/schema/vega-lite-schema.json, but couldn't find any mention of "observable10".
We're currently on vega-lite/v5.20.1.json, which isn't the latest version.
However, I didn't any references to that color scheme in the past few releases https://github.com/vega/vega-lite/releases

It might be worth searching for/opening an issue in https://github.com/vega/vega-lite/issues to see if it could be added to the schema?

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.

2 participants