Emailing vega chart

試著忘記壹切 提交于 2019-12-11 15:18:59

问题


Is there any way I can send vega chart in email from server side? Say from a spring boot app? I have the vega spec saved in db and I can fill up data as well from the server side, was wondering how I can use this to send out an email with the chart.

Vega embed won’t work as most of the email clients filter out script tags from body.

I tried vega-cli too but since it’s based on nodejs libs I could not integrate it with my spring boot.

Appreciate any help find a solution here.


回答1:


As discussed on slack, I think for email, the best solution is to create a bitmap (e.g., PNG) and include it since you can't really run JS on email clients.

You can optionally provide a link to a hosted page too (esp. if your chart is interactive since the PNGs won’t be interactive obviously).



来源:https://stackoverflow.com/questions/54946650/emailing-vega-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!