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

Closed
wants to merge 1 commit into from

Conversation

apoorvkh
Copy link
Contributor

@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
Contributor 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?

@apoorvkh
Copy link
Contributor Author

Okay, I am circling back to this: I found "observable10" at this line in vega-lite-schema.json. It was added in v5.21.0.

https://github.com/vega/vega-lite/blob/802d661e561068d702459b0b14a15736a6e8ea18/build/vega-lite-schema.json#L4756

It would be great if altair could bump the vega-lite version soon! But I presume that will happen inevitably and this issue will be resolved then, so I will close this issue for now.

Thanks!

@apoorvkh apoorvkh closed this Oct 21, 2024
@dangotbanned
Copy link
Member

Okay, I am circling back to this: I found "observable10" at this line in vega-lite-schema.json. It was added in v5.21.0.

https://github.com/vega/vega-lite/blob/802d661e561068d702459b0b14a15736a6e8ea18/build/vega-lite-schema.json#L4756

It would be great if altair could bump the vega-lite version soon! But I presume that will happen inevitably and this issue will be resolved then, so I will close this issue for now.

Thanks!

Great thanks for following through on this @apoorvkh

Yeah we will have "observable" in altair>=5.5.0 in that case

@apoorvkh apoorvkh deleted the observable10 branch October 22, 2024 14:07
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