You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there is different type of json, namely, application/json and application/vnd.vegalite.v5+json (for altair 5). So I'll include vega-lite also as format, it probably would be better if it was renamed to something as vl-json.
Does it make sense to factor out this list into a variable and use it in the strings everywhere? Feels like this is repeated quite often. (red. FORMATS = ["html", "json", "png", "svg", "pdf", "vega", "vega-lite"])
This list should also be updated in the docstring of v5/api.py:TopLevelMixin.save
I can't comment on the correct line but vega does not work here. It will try to access the mimebundle with key image/svg+xml on line 169.
Currently there is no support for vega or vega-lite as output format. This could be supported, both options would be json, but vega would be a compiled version of the Vega-Lite specification with application/vnd.vega.v5+json mime type where the vega-lite would be application/vnd.vegalite.v5+json. This is linked to bullet number 1.
The text was updated successfully, but these errors were encountered:
For the save method, there are no mimebundles to be saved or returned so I think format='vega-lite' will be equivalent to format='json' except that we could extend the part where format is determined based on the file extension https://github.com/altair-viz/altair/blob/master/altair/utils/save.py#L84 so that .vl and .vl.json are linked to vega-lite, rest same as json.
mattijn
changed the title
associate file endings with vega or vegalite to support direct rendering in jupyter
Improve support for Vega and VegaLite as format in save and mimetype
Jan 25, 2023
Vega and Vega-Lite are declarative visualization grammars that enable visualizations to be encoded as JSON data. For more information, see the documentation of Vega or Vega-Lite. JupyterLab supports rendering Vega 5.x and Vega-Lite 3.x data in files and cell output
Potential feature requests.
Currently there is no support for
vega
orvega-lite
as outputformat
. This could be supported, both options would be json, butvega
would be a compiled version of the Vega-Lite specification withapplication/vnd.vega.v5+json
mime type where thevega-lite
would beapplication/vnd.vegalite.v5+json
. This is linked to bullet number 1.The text was updated successfully, but these errors were encountered: