Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html charts in email without using javascript [closed]

I'm looking for nice charts for my newsletter. Since javascript is not email friendly I need an html only solution.

I'll send email once a month with statistics of user's performance and stuff done during the month.

So what do you think is the best solution? Can I found some nice basic html charts where I can change little in my back-end with user's data?

I know with JS it would be easy, but is not my case. I'll send both to mobile and desktop.

Thank you very very much!!

like image 484
J.Williams Avatar asked Mar 07 '14 13:03

J.Williams


4 Answers

I would recommend against trying to attach js/css/html based charts, you will run into a lot of issues. I've wrote a tutorial on generating charts as images and attaching to emails here: http://www.sqldashboards.com/b/send-email-with-graphs/ Basically you

  1. Configure mutt to allow sending email
  2. Generate charts at the command line.
  3. Send an email, with attachments using mutt
like image 60
Ryan Hamilton Avatar answered Oct 20 '22 22:10

Ryan Hamilton


You can't simply use raw HTML to get charts. It is simply not possible, just got to use a scripting language to do so, HTML isn't one.

If you are willing to use CSS3 to make your chart a reality, I suggest you to check out this good article: http://www.ssiddique.info/dynamic-chart-in-css.html

like image 25
sidney Avatar answered Oct 20 '22 21:10

sidney


A little late to the game here, but my team at Ramen recently spun out some internal functionality into a standalone product that does just this: https://ChartURL.com

You can generate charts on the fly using an "Encrypted URL" scheme, or you can send us huge amounts of data and return a Short URL that'll resolve to an image. These URLs can be used in web apps & mobile apps, but the original intent was email charts so I hope this helps!

like image 4
Ryan Angilly Avatar answered Oct 20 '22 21:10

Ryan Angilly


You can use any scripting language you want pre-send, but the email itself needs to be pure html. The only way you can change its contents after send, is if you link it to a hosted image, and you swap out that image.

With that being said, if you are after a html email example with a chart to get started, take a look here. It is a fluid template which is the most widely supported technique for mobile, web and desktop browsers.

like image 1
John Avatar answered Oct 20 '22 22:10

John