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

expected precision field of Projection to be a number not a string in VegaLite 3.3.0 schema #5190

Closed
DougBurke opened this issue Jul 9, 2019 · 6 comments · Fixed by #5191
Labels

Comments

@DougBurke
Copy link
Contributor

I was surprised to find the precision field of Projection has a type of string and not number:

https://github.com/vega/schema/blob/master/vega-lite/v3.3.0.json#L8971

        "precision": {
          "description": "Sets the threshold for the projection’s [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection’s current resampling precision which defaults to `√0.5 ≅ 0.70710…`.",
          "type": "string"
},
@domoritz
Copy link
Member

Looks like Vega expects strings: https://vega.github.io/vega/docs/projections/

@DougBurke
Copy link
Contributor Author

I wonder why? Oh well, thanks for checking.

@domoritz
Copy link
Member

Well, could be a bug in Vega. Could you check?

@domoritz
Copy link
Member

@DougBurke
Copy link
Contributor Author

Sorry - was in a meeting so couldn't investigate further.

@domoritz
Copy link
Member

No problem. Again, thanks for catching and reporting the issue! I fixed it in #5191.

DougBurke added a commit to DougBurke/hvega that referenced this issue Jul 12, 2019
Even though version 3.3.0 of the Vega-Lite schema says that the precision
field is a string, this is an error, and it should be a number. I have
therefore reverted the previous change during 0.4.0.0 development that
wrote out a string rather than number.

See vega/vega-lite#5190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants