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

Escape special chars in encoding shorthand syntax #9

Open
brucala opened this issue Aug 11, 2023 · 0 comments
Open

Escape special chars in encoding shorthand syntax #9

brucala opened this issue Aug 11, 2023 · 0 comments

Comments

@brucala
Copy link
Owner

brucala commented Aug 11, 2023

Due to the shorthand string syntax, using chars like ( or : in the Encoding can give unexpected results:

julia > Encoding("Beak Length (mm):Q")
Deneb.EncodingSpec: 
{
  "x": {
    "aggregate": "Beak Length ",
    "field": "mm",
    "type": "quantitative"
  }
}

At the moment there are no escaping rules to avoid that. In the meantime one can simply use the verbose syntax without the shorthands:

> julia> Encoding(x=(field="Beak Length (mm)", type=:quantitative))
Deneb.EncodingSpec: 
{
  "x": {
    "field": "Beak Length (mm)",
    "type": "quantitative"
  }
}
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

1 participant