Convert VEGALITE to PNG
Turn VEGALITE files into PNG. The chart drawn by Vega-Lite at twice its size for sharp lines and text.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop VEGALITE files on the dialor turn it to pick what to do
A Vega-Lite chart as a sharp PNG.The chart is drawn by Vega-Lite at twice its size.
What you get
One PNG file with the chart drawn by Vega-Lite. It is rendered at twice its size, so lines and text stay sharp.
PNG is a lossless image format with an alpha channel. It suits graphics with sharp edges, which is what a chart is.
Data from a URL
The data has to be inside the spec. A spec that loads its data from a URL stops with
unsupported_elements, because the data is not fetched.Next steps
Once you have the PNG, you can change it further. resize PNG changes its dimensions, and compress PNG is there for the file itself.
VEGALITE and PNG.What each format is.
The formats
Vega-Lite Chart
A chart described as JSON in the Vega-Lite grammar, the format Altair and many notebooks and agents write.
- Extensions
- .vl.json .vegalite
- MIME type
- application
/vnd .vegalite .v6 +json - Kind
- Text and data
PNG
Lossless raster images with an alpha channel. Screenshots, icons and graphics with sharp edges.
- Extensions
- .png
- MIME type
- image
/png - Kind
- Images
In your code.The same VEGALITE to PNG conversion through the API, for your app or your agent.
$ cv convert report.vl.json report.png$ cv convert report.vl.json report.pngQuestions.What people ask about VEGALITE to PNG.
Yes. Give the spec as a .vl.json or .vegalite file, and you get one PNG of the chart drawn by Vega-Lite.
The chart is drawn at twice its size. This keeps lines and text sharp.
The spec loads its data from a URL. The data is not fetched, so the conversion stops with unsupported_elements.
No. The data is not fetched from a URL. Put the data inside the spec.