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

shorthand for scale type and color scheme #1116

Open
mbostock opened this issue Nov 26, 2022 · 0 comments
Open

shorthand for scale type and color scheme #1116

mbostock opened this issue Nov 26, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

I want to be able to say

color: "blues"

as shorthand for

color: {scheme: "blues"}

and likewise I could imagine

y: "sqrt"

as shorthand for

y: {type: "sqrt"}

Basically for any scale option that’s defined as a string, we check if it’s a valid scale type. And for color, we also check if it’s a valid color scheme. (These sets should be non-overlapping.) We do something similar for the projection option in #1111 and it’s nice.

@mbostock mbostock added the enhancement New feature or request label Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant