Telerik的RadHtmlChart的SVG内容 [英] SVG content of Telerik RadHtmlChart

查看:337
本文介绍了Telerik的RadHtmlChart的SVG内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我在VB的aspx页面会启动RadHTMLChart,我想抓住该图表的SVG code。然而,由于在图表呈现的客户端,我要推出这个aspx页面,然后抓住从第二aspx页面的SVG code回发期间。目前,我使用使用Server.Execute(firstpage.aspx)抢SVG code,但不起作用。我想用SVG生成PDF文档,但使用Server.Execute命令似乎在后台后,自带不要等待它先做完code运行,所以我没有抓住SVG内容。有谁知道另一种方式来抓住这个SVG内容?

Currently, I have an aspx page in vb that launches a RadHTMLChart and I want to grab the SVG code of that chart. However, since the chart is rendered client-side, I have to launch this aspx page and then grab the SVG code from a second aspx page during postback. Currently, I am using Server.Execute (firstpage.aspx) to grab the SVG code but this does not work. I want to use the SVG to generate a PDF document but the Server.Execute command seems to run in the background and the code that comes after it do not wait for it to finish first, hence I am not grabbing the SVG content. Does anyone know of another way to grab this SVG content?

推荐答案

看来你需要所有这一切都在服务器上完成,所以你需要找到一种方法来启动浏览器的服务器上,从它那里得到所需要的数据并关闭它。我觉得一个工具,称为PhantomJS可以为你做这个,所以你可以给它一个裂缝(它是免费的,我认为)。

It seems you need all of this done on the server, so you need to find a way to launch a browser on the server, get the needed data from it and close it. I think a tool called PhantomJS can do this for you, so you can give it a crack (it's free I think).

下面是有关导出一个HtmlChart一个例子,但是它依赖于用户的交互(其可以通过一些脚本被自动化),但它需要打开客户机上的页面:http://www.telerik.com/support/$c$c-library/exporting-radhtmlchart-to-png-and-pdf.无论如何,这仍然可能是有益的思路并展示如何获得SVG字符串。

Here is an example on exporting an HtmlChart, but it relies on a user interaction (which can be automated via some scripts) but it needs the page opened on the client machine: http://www.telerik.com/support/code-library/exporting-radhtmlchart-to-png-and-pdf. Anyway, it may still be helpful for ideas and to show how to get the SVG string.

这篇关于Telerik的RadHtmlChart的SVG内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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