vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
98 stars 12 forks source link

Fix for bar_chart_trellis_compact #23

Closed jonmmease closed 1 year ago

jonmmease commented 1 year ago

Fix for example https://altair-viz.github.io/gallery/bar_chart_trellis_compact.html

This reintroduces a JSON serialization step that fixes an obscure error. The error happened when the height of a Vega-Lite figure was an object. The error seems to happen because the height object had a null prototype, which seems to happen when Deno automatically converts a serde_json object to a JavaScript object. By reintroducing JSON deserialization in JavaScript, the deserialized objects have the appropriate empty prototype.