Open mattijn opened 3 years ago
In this observable notebook I present my use-case: https://observablehq.com/@mattijn/compile-vegalite-to-vega I've some simple vega-lite spec that I compile into a vega spec: vega_spec = vegalite.compile(vegalite_spec).spec
vega_spec = vegalite.compile(vegalite_spec).spec
But this vega specification contains many keys with the value undefined for the axis.
undefined
But when clicking on the dots of the vega-lite chart and click 'View Compiled Vega' I see this result for the axis:
No keys with value undefined. Is this difference intended?
Context: this altair test is currently failing: https://github.com/ChristopherDavisUCI/altair/blob/sample417/altair/utils/tests/test_mimebundle.py#L156, since it wants vega output that is defined like this: https://github.com/ChristopherDavisUCI/altair/blob/sample417/altair/utils/tests/test_mimebundle.py#L42, but currently the compiled vega contains many keys with the value undefined.
Undefined values when serialized as JSON remove the keys. We try to not have undefined values in the generated Vega but it looks like we missed something in axes. We can fix this.
In this observable notebook I present my use-case: https://observablehq.com/@mattijn/compile-vegalite-to-vega I've some simple vega-lite spec that I compile into a vega spec:
vega_spec = vegalite.compile(vegalite_spec).spec
But this vega specification contains many keys with the value
undefined
for the axis.But when clicking on the dots of the vega-lite chart and click 'View Compiled Vega' I see this result for the axis:
No keys with value
undefined
. Is this difference intended?Context: this altair test is currently failing: https://github.com/ChristopherDavisUCI/altair/blob/sample417/altair/utils/tests/test_mimebundle.py#L156, since it wants vega output that is defined like this: https://github.com/ChristopherDavisUCI/altair/blob/sample417/altair/utils/tests/test_mimebundle.py#L42, but currently the compiled vega contains many keys with the value
undefined
.