ggvega
ggvega copied to clipboard
empty objects
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": {}
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.
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).
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.
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
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.