brucala / Deneb.jl

Julia API for creating Vega-Lite visualizations
https://brucala.github.io/Deneb.jl/dev/
BSD 3-Clause "New" or "Revised" License
21 stars 1 forks source link

Use `vl-convert` to save charts #5

Open brucala opened 1 year ago

brucala commented 1 year ago

Currently saving charts relies on NodeJS (and that's the only reason Deneb.jl depends on NodeJS). An alternative (currently used by Altair) is to use vl-convert instead. Blog post about vl-convert.

One convenience about vl-convert is that it would be an standalone artifact that does not require any external dependencies, unlike the approach with NodeJS that requires to install things like Canvas.

Unlike NodeJS, vl-convert does not convert to pdf. We could keep both dependencies (vl-convert for png/svg and NodeJS for pdf) but maybe make NodeJS a weak dependency.

George9000 commented 1 year ago

Unlike NodeJS, vl-convert does not convert to pdf.

That's too bad. PDF should be a 'first-class' citizen for export. Until vl-convert can do that, it seems simpler to stay with one dependency (NodeJS) rather than two. Gadfly and Makie uses the Cairo library for export. That's also worth exploring.

brucala commented 11 months ago

vl-convert now also supports PDF