JavaScript 图表 API:Flot jQuery 插件还是 Google 可视化?

发布于 2024-08-12 09:28:37 字数 1074 浏览 5 评论 0原文

我正在寻找要在网站上显示的图表库。我将大量使用这个库(主要用于面积图、折线图和条形图),因此我更愿意在开始实施之前确定我的选择。

我最初考虑的网站图表库列表是:

然而,经过对这个论坛的一些研究和网络上的调查,我将我的候选列表减少到这两个库:

  1. Flot jQuery 插件
  2. Google Visualization

您建议我使用哪一个?为什么(如果您使用过其中一两个,请告诉我您的反馈)?

它们在易用性、性能和功能方面如何相互比较?

谢谢

编辑:基于 Flash 图表库不符合我的限制条件

I am looking for a charts library to be displayed on a website. I will use intensively this library (for area, line and bar charts mainly), so I prefer to secure my choice before starting implementing.

The list of website chart libraries that I have initially considered are:

However after some researches on this forum and investigations on the web, I have reduced my candidate list to these two libraries:

  1. Flot jQuery plugin
  2. Google Visualization

Which one do you advise me to use and why (if you have worked with one or two of them, please tell me your feedback)?

How do they compare one to each other regarding ease of use, performance and features?

Thank you

EDIT: Based-Flash Chart libraries were not eligible with my constraints

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

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

发布评论

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

评论(6

ゝ杯具 2024-08-19 09:28:37

经过对这两个可视化库的多次尝试和研究后,我将尝试回答我自己的问题,这里是我自己的每个解决方案的优点列表:

Flot Pros


  1. jQuery 插件:如果您熟悉 jQuery (或者如果您的应用程序与 jQuery 集成),使用 Flot
  2. 离线可视化 似乎很自然:您可以测试或将其安装到内部网站中。 Google Visu 仅当您可以访问 google 网站时才能工作!
  3. 自定义:这基本上是一个 JavaScript 文件,因此如果您擅长 JS 编码,您可以根据需要自定义图表。此外,Flot 插件系统还可以让您实现更好的模块化

Google Visualization Pros


  1. 文档:太棒了! Google 网站上提供了每种类型图表的示例
  2. 易于使用:真的。比 Flot 更容易(需要以某种方式自定义 div 容器)
  3. 强大:您有多种图形和功能(缩放、交互性......)
  4. Java 和 Python API :它对构建数据表有很大帮助(至少对我来说,我可以使用 Java API)

底线


如果您熟悉 jQuery,请使用 Flot。如果您出于某种原因需要离线查看图表,请使用 Flot。如果你想完全控制,请选择Flot。

如果您不认识上面的自己,请使用 Google Visu。它很容易学习和实施,有很好的文档记录并且非常强大。

I will try to answer my own question after some several tries and researches about these 2 visualization libraries, here are my own list of pros for each solution :

Flot Pros


  1. jQuery plugin : if you are familiar with jQuery (or if your apps is integrated with jQuery), it seems natural to use Flot
  2. Offline visualization : you can test or have it installed into an internal website. Google Visu can only work if you have acces to the google website !!
  3. Customization : this is basically a JavaScript file so if you are good at JS coding, you can customize your charts as your convenience. Also the Flot plugin system allows you better modularity

Google Visualization Pros


  1. Documentation : awesome ! Examples for each type of graphs are available in the Google site
  2. Easy to use : Really. Easier than Flot (that requires to somehow customize the div container)
  3. Powerful : you have many sorts of graphs and features (zooming, interactivity,...)
  4. Java and Python API : it can helps a lot for constructing the Data Table (at least for me, I can use the Java API)

Bottom Line


If you are familiar with jQuery, go with Flot. If you need for some reasons to see your charts offline, go with Flot. If you want full control, go with Flot.

If you don't recognize yourself above, go with Google Visu. It's easy to learn and implement, very well documented and extremely powerful.

怕倦 2024-08-19 09:28:37

不在您的列表中,但我建议您查看 Highcharts http://www.highcharts.com/
Highcharts 是 SVG,因此,它比 Flot 更加动态,您可以使用 CSS 重新设计图形、附加事件、执行动画等...
它还与 IE6 兼容,并且可以在服务器端运行(感谢 Batik)
我目前正在构建一个图形密集型应用程序,并在经过大量基准测试后选择了 Highcharts。我不后悔我的选择。

Not in your list, but I would recommend you have a look at Highcharts http://www.highcharts.com/
Highcharts is SVG, and as such, it is much more dynamic than Flot, you can restyle graphs with CSS, attach events, perform animations, etc...
It is also compatible with IE6 and it works server-side (thx to Batik)
I'm currently building a graph-intensive application, and chose Highcharts after lots of benchmarkings. I don't regret my choice.

顾北清歌寒 2024-08-19 09:28:37

piwik 项目使用 打开 Flash 图表(不在您的列表中)。

它很容易使用,有大量的工作示例,非常用户友好。

The piwik project uses the Open Flash Chart (not on your list).

It's easy to use, has plenty of working examples very user friendly.

夏见 2024-08-19 09:28:37

我是 Flot 的用户,也是它的忠实粉丝。我在 Grails 应用程序中使用它,并使用堆叠条形图、折线图和饼图,包括时间序列和一堆交互功能(即通过复选框关闭/打开序列等)。

我发现总体上使用起来很愉快,并且感觉 API 开发得相当好(我看到许多其他 JS 图表库也采用了该 API,因此您甚至可以灵活地迁移到该 API 中的另一个工具包)未来)。从刚才看了一下google API,我想我更喜欢flot(虽然google也可能有能力传递一系列,但没有从样本中看到它)。

他们几周前刚刚推出了一个支持插件的新版本(0.6),我预计这将激发更多创新。

所以我认为这部分取决于您计划使用的其他技术。可视化似乎与 GWT 集成,因此如果您正在考虑使用它,那么可视化就是您的最佳选择。另一方面,如果您正在考虑使用 JQuery 进行 AJAX,那么 Flot 可能更合适。

当我决定使用它时,谷歌似乎没有交互式可视化,只有谷歌图表(图像),这是我选择 Flot 的原因之一。

I am a user of Flot, and a big fan. I use it in a Grails application, and use stacked bar, line, and pie charts, including time-series and a bunch of interactive capabilities (i.e. turn off / on series with checkboxes, etc).

I found it to be a pleasure to work with overall, and feel the API is quite well developed (I saw that a bunch of other JS charting libraries adopted the API, so you'll even have some flexibility to move to another kit in the future). From looking at the google API just now for a minute, I think I like flot's better (although google may have ability to pass in a series as well, didn't see it from samples).

They just came out with a new version a few weeks ago (0.6), that supports plugins, which I expect will stimulate more innovation.

So I think part of this depends on other technologies you are planning to use. It seems like Visualization is integrated with GWT, so if you are thinking of using that, Visualization is the way to go. On the other hand, if you are thinking of using JQuery for AJAX, then Flot might be a more natural fit.

When I was making my decision to use this, it seems like Google didn't have interactive visualizations, only google charts (images), which is one of the reasons I went with Flot.

硬不硬你别怂 2024-08-19 09:28:37

有jqPlot(http://www.jqplot.com/),一个看起来不错的开源项目。也基于 jQuery。我会尝试一下 jqPlot,jQuery flot 似乎不活跃。

There is jqPlot (http://www.jqplot.com/), an open source project which looks good. Based on jQuery as well. I will give jqPlot a try, jQuery flot seems to be inactive.

或十年 2024-08-19 09:28:37

不在您的列表中,但非常令人印象深刻:ExtJS 4.0 图表

Not in your list, but very impressive: ExtJS 4.0 charts

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文