我可以获得 Developer Express WebChartControl 的图像输出吗?

发布于 2024-07-04 00:37:45 字数 92 浏览 6 评论 0原文

我的网页上有一个 WebChartControl。 生成图表时,会生成图像并将其显示在页面上。

有没有办法在运行时获取此图表并将其保存为图像输出?

I have a WebChartControl on my web page. When the chart was generated, an image is being produced and it was shown on the page.

Is there a way to get and save this chart as an image output on runtime?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不如归去 2024-07-11 00:37:46

当然。 最终图像来自某种 URL。 在网页上查看源代码并查看该 URL 的外观。 通过一定量的逆向工程、使用 System.Web.UI.HtmlTextWriter、也许是 HttpHandler 等,您应该能够得到您想要的东西。

Sure. Ultimately the image comes from a URL of some sort. Do a view-source on the web page and see what that URL looks like. With a certain amount of reverse-engineering, usage of System.Web.UI.HtmlTextWriter, perhaps an HttpHandler, etc. you should be able to get what you want.

左秋 2024-07-11 00:37:46

从 Developer Express 图表控件 (Web) 导出图像的最佳解决方案是:

((IChartContainer)[Your web chart control]).Chart.ExportToImage([Your file name], ImageFormat.Png);

The best solution for exporting an image from a Developer Express chart control (web) is:

((IChartContainer)[Your web chart control]).Chart.ExportToImage([Your file name], ImageFormat.Png);
小霸王臭丫头 2024-07-11 00:37:46

使用 ChartControl 对象的 ExportToImage 方法。这是 WinForm 代码,但同样的概念也适用于 WebChartControl:

    Dim chart As ChartControl = ChartControl1.Clone()
    chart.Size = New Size(800, 600)
    chart.ExportToImage("file.png", System.Drawing.Imaging.ImageFormat.Png)

Use the ExportToImage method of the ChartControl object .. This is WinForm code, but the same concept should hold true for WebChartControl:

    Dim chart As ChartControl = ChartControl1.Clone()
    chart.Size = New Size(800, 600)
    chart.ExportToImage("file.png", System.Drawing.Imaging.ImageFormat.Png)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文