如何在HTML电子邮件正文中嵌入ZedGraph. [英] How to embed a ZedGraph in an HTML email body.

查看:117
本文介绍了如何在HTML电子邮件正文中嵌入ZedGraph.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将ZedGraphs图形嵌入html电子邮件中,并将其发送到通讯组列表.为此,我需要将图形直接绘制到图像上,以便可以将其嵌入,或者在可能的情况下以HTML格式输出该图形并将其嵌入.

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?

推荐答案

是的,一个确定的想法:您不能.考虑将数据显示为SVG矢量图形( http://en.wikipedia.org/wiki/SVG [ ^ ]).该标准是开放的,您可以创建一些代码以这种矢量格式显示数据,可能使用一些可用的库(对不起,您没有共享所使用的平台,因此在编程方面没有更多建议).

我没有尝试嵌入电子邮件中.由于SVG在HTML中的嵌入相对较新(与SVG本身相比),因此查看者可能不会显示它.使用一些手动合成的图像,无需任何编程即可轻松尝试.

如果这不起作用,则您几乎必须根据数据和图形渲染代码生成JPG.您可以轻松地将其嵌入HTML或使用内容类型"image/gpeg"将其用作多部分电子邮件中的单独部分,请参见
你知道吗?为了安全起见,您需要JPEG.

—SA
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


这篇关于如何在HTML电子邮件正文中嵌入ZedGraph.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆