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

empty objects #5

Open
ijlyttle opened this issue Jun 15, 2019 · 5 comments
Open

empty objects #5

ijlyttle opened this issue Jun 15, 2019 · 5 comments

Comments

@ijlyttle
Copy link
Contributor

This may be a matter of personal taste 🤓

Would it be a difficult thing to omit empty objects from the "final" Vega-Lite spec? For example, things like this:

"scale": {}
@wenyuyangpku
Copy link
Contributor

Thanks for your advice. I have removed the empty scale.
I believe it's not difficult to omit all empty objects. But let me do it later. For now, these "mistakes" are helpful for me to modify the code.

@ijlyttle
Copy link
Contributor Author

Sounds good - hurry on the bigger fix, when you will have it done, please close the issue and note the commit where you made the change.

As we do more, we can talk about using feature branches for this (perhaps you have experience with this already).

@wenyuyangpku
Copy link
Contributor

wenyuyangpku commented Jun 16, 2019

Yes, I have some experience in feature branches but not on RStudio. Looking forward to your guidance.

I have added a function removeEmpty(Object) to omit the null value and {} Object.

@ijlyttle
Copy link
Contributor Author

Happy to discuss more the next time we have a meeting, one place to get started might be the pr_*() set of functions in usethis: https://usethis.r-lib.org/reference/pr_init.html

@ijlyttle
Copy link
Contributor Author

ijlyttle commented Jun 19, 2019

Hi Wenyu,

Sorry to reopen this issue - we may have to rethink this a bit to get a ggplot geom_path() to work using "mark": "line" in Vega-Lite.

See https://vega.github.io/vega-lite/docs/encoding.html#order, where they explicitly use {"value": null} in the order encoding.

@ijlyttle ijlyttle reopened this Jun 19, 2019
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

No branches or pull requests

2 participants