Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bar Graph in email body

Is it possible to draw a dynamic bar graph in email body. (need to be compatible with Outlook)

I need to draw a graph in email sent through oracle database and dynamic value will be passed through a procedure.

like image 563
Tushar Avatar asked Jan 29 '13 12:01

Tushar


2 Answers

The best solution is to create your bar chart dynamically then transform it into an image. You could simply use print screen for this and import it into Photoshop or whatever and edit the image there.

HTML emails are notoriously bad things in that they respond best to html code from 10+ years ago.

Some basic guidelines:

  • Don't try to use HTML5 in an email.
  • Don't try to use fancy CSS or link to an external stylesheet or even use css styles in the HEAD.
  • Don't try and use javascript as it won;t work
  • Don't try and use Flash as it won't work.

  • DO use inline CSS

  • DO use HTML TABLES for layout
  • DO use images but try and keep the filesize as small as possible.
like image 177
Billy Moat Avatar answered Sep 16 '22 11:09

Billy Moat


You could use something like google charts to create a dynamic image (passing through the correct data sets) that you embed into your html email.

http://imagecharteditor.appspot.com/

http://www.jonwinstanley.com/charts/

like image 39
ncremins Avatar answered Sep 19 '22 11:09

ncremins