0

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.

Venugopal Madathil
  • 2,031
  • 3
  • 34
  • 44

1 Answers1

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).

kanitw
  • 874
  • 10
  • 19