vega / vega-render-service

A service to render Vega visualizations
https://render-vega.vercel.app
18 stars 5 forks source link

Support SVG -> PDF #7

Open domoritz opened 4 years ago

domoritz commented 4 years ago

This would allow people to create PDFs for charts with interactive state.

This feature can come later.

hungngo97 commented 4 years ago

By this, do you mean capturing the current graph in interactive mode on the editor and get its SVG? Then parse the SVG to PDF?

domoritz commented 4 years ago

Yes. The challenge is still that the server won't have fonts. Some charts may look slightly different. Also, spacing is calculated by Vega based on the fonts in the browser so there may be problems because of that.

hungngo97 commented 4 years ago

But can we take a snapshot of the SVG in the middle of a graph interaction?

domoritz commented 4 years ago

Yes, at any time. You can get it from the view object.