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

Field named "constructor" causes rendering to fail #8125

Open
jakevdp opened this issue Apr 25, 2022 · 2 comments
Open

Field named "constructor" causes rendering to fail #8125

jakevdp opened this issue Apr 25, 2022 · 2 comments
Labels

Comments

@jakevdp
Copy link
Contributor

jakevdp commented Apr 25, 2022

Minimal reproduction (view in editor):

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.17.0.json",
  "data": {"values": [{"constructor": "x"}]},
  "mark": "circle",
  "encoding": {"color": {"field": "constructor"}}
}

I can only reproduce this with the string "constructor"; it works correctly with any other string.

First reported in https://stackoverflow.com/q/72006719/2937831

@jakevdp
Copy link
Contributor Author

jakevdp commented Apr 25, 2022

Update, similar failures can be seen for fields named "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", and other standard javascript object attributes 😀

@domoritz
Copy link
Member

Haha, good catch. We should check whether this is a Vega or Vega-Lite issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants