I need to send an e-mail in C# with html formatting. In the e-mail message, I'd like to include a flot.js chart and I don't know how. Can anyone suggest how I might include this chart in my mail?
Asked
Active
Viewed 922 times
-2
-
3Including JavaScript code in an email message probably won't work. I imagine every mail client on the planet blocks JavaScript at this point. – David Jun 18 '13 at 13:16
-
2You should render the chart as an image and include it in the email HTML or as an attachment. – Dustin Kingen Jun 18 '13 at 13:17
-
Your email could contain an URL to a web page that includes the flot.js and does the drawing. – tomsv Jun 18 '13 at 13:23
-
Ok, I'm finding this Rendering [HTML+Javascript server-side](http://stackoverflow.com/questions/8391133/rendering-htmljavascript-server-side) but free. – kintaro Jun 18 '13 at 13:31
2 Answers
1
I found the answer using the asp.net charts control, this component allow generate images in server-side in memory, this approach is the solution for my problem.
On the other hand this component it's integrated in .net framework 4.
Thanks for the comments.
k

kintaro
- 2,393
- 2
- 16
- 16
0
I Know it's very late to answer this, but I just finished sending flot charts in email. I am using MVC4 in Asp.net.
I send the data to the view -> generate the graph with flot with javascript -> converted the canvas to base64 -> send it back to the server through ajax .
I did this for automated reporting and everything is working fine .

Rajat26
- 39
- 3