纯后台生成highcharts图片有哪些方法?

WBOY
Release: 2016-06-06 20:22:02
Original
1361 people have browsed it

比如说,领导抛给你一个需求,把一些数据做成图表,每天通过邮件发送,让领导能在邮件中就看到图片,你会有什么思路呢?
本人使用的是phantomjs这个神器,它的内核是WebKit引擎,不提供图形界面,只能在命令行下使用,我们可以用它完成一些特殊的用途。
详细的使用可以参看我的博客,有详细的代码。

回复内容:

比如说,领导抛给你一个需求,把一些数据做成图表,每天通过邮件发送,让领导能在邮件中就看到图片,你会有什么思路呢?
本人使用的是phantomjs这个神器,它的内核是WebKit引擎,不提供图形界面,只能在命令行下使用,我们可以用它完成一些特殊的用途。
详细的使用可以参看我的博客,有详细的代码。

有很多种,我来简单说说:

1、Highcharts 的纯 Java的封装,直接通过 Java 生成 Highcharts 图表

项目地址:https://github.com/hcharts/highcharts-serverside-export
Copy after login

2、基于 Phantomjs ,官方已经提供了基于 Phantomjs 的导出服务,其中可以直接通过命令行的形式加载 Highcharts 配置代码然后生成图表图片,相关信息:

1)github: https://github.com/highcharts/highcharts-export-server/tree/master/phantomjs
2)相关说明:http://bbs.hcharts.cn/forum.php?mod=viewthread&tid=989
Copy after login

3、还有官方出品的基于Node js-dom 的实现,见:https://gist.github.com/TorsteinHonsi/e8a1e6971608523eb8dd

网上搜一搜 一搜一大堆 首先最方便的肯定是换一个后台的图标组件了
然后highcharts本身据说有一个export的文件 加载了可以直接生成svg
然后模拟一个http去访问这个页面 把数据拿回来就可以了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!