HighCharts图像导出
我在我的应用程序中使用 HighChart。 我想在单击按钮时导出图表图像 http://jsfiddle.net/hfrntt/fXHB5/1896 /。 但我想将图像保存在预定义的文件夹中,并删除保存图像的保存对话框弹出窗口。
在按钮上单击保存在预定义文件夹中的图像。(无保存对话框)
提前致谢
I am using HighChart in my application.
I want to export chart image on a button click like http://jsfiddle.net/hfrntt/fXHB5/1896/.
but i want to save image in a predefined folder and remove the save dialog pop-up to save image.
On button click image saved on the predefined folder.(No save dialog)
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须设置一个导出服务器。当客户端将 Highcharts SVG 文件发送到此服务时,它将被转换为图像。在服务器将图像返回给客户端之前,您可以将其保存到预定义的文件系统中。
在这里您可以找到一个 PHP 导出服务器和一个基于 Java 的导出服务器。 https://github.com/highslide-software/highcharts.com /tree/master/exporting-server 由 Highcharts 开发
这些导出服务器设置用于删除临时创建的文件。您必须稍微更改代码以防止这种情况发生。
另请阅读这篇文章,了解有关 Highcharts 导出服务器的更多背景信息
You have to setup an exportserver. Upon the client sends the Highcharts SVG file to this service it will be converted to an image. Before the server returns the image to the client you can save it to the predefined filesystem.
Here you can find a php export server and a java based one. https://github.com/highslide-software/highcharts.com/tree/master/exporting-server developed by Highcharts
These exportservers are setup to remove the temporary created files. You have to change the code a bit to prevent this.
read also this article for more background information on Highcharts exportservers
这将涉及的不仅仅是简单地使用高图表。您将必须使用某种包装器来实际在服务器端渲染图表/页面,然后将其本质上输出为图像。以下是取自 帖子< /a> 在 highcharts 网站上。
GWT Highcharts 包装
Highcharts-server-side-export (使用 Rhino/Batik)
This is going to involve much more than simply using highcharts. You are going to have to use some sort of wrapper that will actually render the chart/page on the server-side and then essentially output it as an image. The following are links taken from a post on the highcharts website.
GWT Highcharts wrapper
Highcharts-server-side-export (with Rhino/Batik)