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

plots: allow to modify any (Vega) prop #4909

Closed
jorgeorpinel opened this issue Nov 19, 2020 · 4 comments
Closed

plots: allow to modify any (Vega) prop #4909

jorgeorpinel opened this issue Nov 19, 2020 · 4 comments
Labels
A: plots Related to the plots enhancement Enhances DVC feature request Requesting a new feature

Comments

@jorgeorpinel
Copy link
Contributor

Could plots modify behave a bit more like config where it accepts a key pair as arguments? Instead of relying on specific options like -x and --title to set the corresponding Vega properties.

All of these could be valid keys: https://vega.github.io/vega/docs/specification/ although validating the values could be tricky...

@pared
Copy link
Contributor

pared commented Nov 19, 2020

We could actually go with dictionary/json update. When we were talking about smoothing plots I mentioned that approach.
We could let user provide his own "modification" that would be applied only to particular plot - so the end plot would be a sum of template + modification applied with dvc plots modify (or even yaml written in dvc.yaml).

@pared
Copy link
Contributor

pared commented Nov 19, 2020

As to veryfing, maybe we could make use of vega schema, but its quite big, not sure if its worth it:
https://raw.githubusercontent.com/vega/schema/master/vega-lite/v4.17.0.json

@skshetry
Copy link
Member

skshetry commented Dec 5, 2020

@pared, datamodel-code-generator can generate the pydantic model from the JSONSchema: https://pydantic-docs.helpmanual.io/datamodel_code_generator. That might be useful.

@daavoo daavoo added the A: plots Related to the plots label Feb 22, 2022
@dberenbaum
Copy link
Collaborator

Probably not something we are likely to prioritize. Closing but happy to revisit in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: plots Related to the plots enhancement Enhances DVC feature request Requesting a new feature
Projects
None yet
Development

No branches or pull requests

5 participants