Email Google Visualization Chart for Email

Can I send Google visualization graphics to an email client? I tried to copy javascript code while sending email, but it was deleted on the fly gmail.

Thanks and respect.

+6
source share
4 answers

Email clients have very little JS support. so you have to use image graphics. But you can wrap the chart in a link to the svg version.

+1
source

Google charts can be published in two ways:

  • as picture. Edit Chart-> Publish Chart-> Format: Image. A link to the image is created. This image link can be used on any html page or can be embedded in any email.

  • like an interactive chart. Edit Chart-> Publish Chart-> Format: Interactive Chart. In this case, javascript code should be inserted. This could only be posted on html pages. This cannot be attached in the body of the message, since most mail servers / clients do not process javascript code (AFAIK).

+2
source

After 3.5 years ... :)

My team at Ramen recently highlighted some of the internal features in a standalone product that does just that: https://ChartURL.com

You can create diagrams "on the fly" using the "Encrypted URL" scheme, or you can send us a huge amount of data and return a short URL that will be allowed for the image.

It was built on top of C3js.org, so there is a subtlety of flexibility in what you can create.

These URLs can be used in web and mobile applications, but the original intentions were email addresses, so I hope this helps!

+2
source

Doesn't Google Charts have an API in which you can just create a URL and it returns an image - no Javascript needed? He, of course, is used to it. If you can use this, then:

a) Just put the URL in the email and give the email client its users

b) Extract the image using CURL and attach to the email.

0
source

Source: https://habr.com/ru/post/908814/


All Articles