vega-lite
vega-lite copied to clipboard
Field named "constructor" causes rendering to fail
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
Update, similar failures can be seen for fields named "hasOwnProperty"
, "isPrototypeOf"
, "propertyIsEnumerable"
, and other standard javascript object attributes 😀
Haha, good catch. We should check whether this is a Vega or Vega-Lite issue.