Click here to Skip to main content
16,016,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to embed ZedGraphs graphs in html emails and send them to a distribution list. In order to do this I need to draw the graph directly to an image so I can embed it or if possible output the graph in HTML format and embed it that way. Any ideas?
Posted

1 solution

Yes, one sure idea: you cannot. Think about presenting your data as SVG vector graphics (http://en.wikipedia.org/wiki/SVG[^]) embedded in HTML. This standard is open, you can create some code presenting your data in this vector format, probably using some available library (sorry, you did not share what platform you use, so you get no further advice on programming).

I did not try embedding in e-mail. As embedding of SVG in HTML is relatively new (compared to SVG itself), the viewers may not show it. It's easy to try though, without any programming, using some manually composed image.

If this does not work, you are pretty much bound to generating JPG based on your data and graphic rendering code. This is something which you can easily embed in HTML or use as a separate part in your multipart e-mail using the content type "image/gpeg", see http://www.iana.org/assignments/media-types/image/index.html[^].

By the way, "image/svg+xml" also exists, but again, I'm not sure e-mail viewers will show it properly. I guess it depends.

You know what? To be on safe side, you need JPEG.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900