altair-viz / altair_saver

Altair extension for saving charts in a variety of formats.
BSD 3-Clause "New" or "Revised" License
94 stars 32 forks source link

NodeJS backend not rendering themes to SVG #98

Closed versipellis closed 2 years ago

versipellis commented 2 years ago

Possibly related to #21 #22 and #81 - but the nodeJS backend is not properly rendering themes applied to SVG outputs, both when using chart.save('output.svg'),chart.save('output.svg', embed_options={'renderer':'svg'}), andsave(chart, "output.svg")`. It renders fine in Jupyter and vega-embed.

jakevdp commented 2 years ago

Thanks - I believe this is a duplicate of #81. vega-cli (used by nodejs) does not support themes. For SVG output, you can use the selenium renderer instead, which does support themes.

versipellis commented 2 years ago

Ah, I misread that issue. Thanks @jakevdp - with both the Selenium renderer and vega-cli installed, how does one specify which renderer to use?

jakevdp commented 2 years ago

You can pass method='selenium' to altair_saver.save()