创建谷歌图表及放大器;转换为图像服务器端 [英] Create Google Charts & Convert to Images Server Side

查看:134
本文介绍了创建谷歌图表及放大器;转换为图像服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在有谷歌排行榜的在我的网站的几个地方实现,我可以将它们转换为图像并进行下载。这很简单。

I currently have google charts implemented at several places on my site and I can convert them to images and download them. That was easy.

现在我希望能创造这些图表并将其转换为图像的所有服务器上。

Now I'm hoping to create these charts and convert them to images all on the server.

我已经做了很多搜索的,我已经想出了这个没有例子,没有任何问题,这是开始让我觉得这是不可能的。

I've done a lot of searching and I've come up with no examples of this, and no questions either, which is starting to make me think it's not possible.

我知道,这些图表是在运行时javacript在客户端的浏览器通常创建的,所以我想我不知道是否有一种方法来运行谷歌图表的javascript我的服务器没有浏览器,并创建和保存这些图片?

I know that these charts are normally created at runtime with javacript in the client's browser, so I guess I'm wondering if there's a way to run the google chart javascript on my server without a browser, and create and save these images?

我被告知有关服务器端JavaScript昨天,在那之前我根本不知道它的存在,但是这会是一个选择吗?

I was told about server side javascript yesterday, until then I had no idea it existed, but could this be an option?

有没有一种方法来模拟在.NET和输出的图像浏览器?我可以在服务器上运行一个浏览器,并获得图像?

Is there a way to emulate a browser in .NET and output an image? Can I run a browser on the server and get the image?

有另一种方式来做到这一点?

Is there another way to do this?

还是这个想法只是不可能?

Or is this idea just impossible?

推荐答案

PhantomJS是行之有效的选择。我在vida.io团队已经开发了一个基于云的解决方案,以生成图像的网站。它是专门为SVG优化(尤其是d3.js数据可视化)。但它可以被用于产生图像的网站内的任何元素

PhantomJS is an option that works well. My team at vida.io has developed a cloud-based solution to generate image for website. It is optimized for svg (in particular d3.js data visualization). But it can be used to generate image for any element within website.

看看我们的Web界面:

Check out our web interface:

http://image.vida.io/

您可以使用我们的服务器或运行自己。服务器堆栈nodejs。

You can use our server or run your own. Server stack is nodejs.

这篇关于创建谷歌图表及放大器;转换为图像服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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