简体   繁体   English

JavaScript Charts API:绘制jQuery插件或谷歌可视化?

[英]JavaScript Charts API: Flot jQuery Plugin OR Google Visualization?

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 Flot jQuery插件
  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 编辑:基于Flash图表库不符合我的约束条件

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 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 jQuery插件 :如果您熟悉jQuery(或者如果您的应用程序与jQuery集成),使用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 !! Google Visu只有在您访问Google网站时才能使用!
  3. Customization : this is basically a JavaScript file so if you are good at JS coding, you can customize your charts as your convenience. 自定义 :这基本上是一个JavaScript文件,所以如果你擅长JS编码,你可以自定义你的图表。 Also the Flot plugin system allows you better modularity 此外,Flot插件系统允许您更好的模块化

Google Visualization Pros Google Visualization专业人士


  1. Documentation : awesome ! 文档 :太棒了! Examples for each type of graphs are available in the Google site Google网站上提供了每种图表的示例
  2. Easy to use : Really. 易于使用 :真的。 Easier than Flot (that requires to somehow customize the div container) 比Flot更容易(这需要以某种方式自定义div容器)
  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) Java和Python API :它可以为构建数据表提供很多帮助(至少对我来说,我可以使用Java API)

Bottom Line 底线


If you are familiar with jQuery, go with Flot. 如果您熟悉jQuery,请使用Flot。 If you need for some reasons to see your charts offline, go with Flot. 如果由于某些原因需要离线查看图表,请使用Flot。 If you want full control, go with Flot. 如果您想要完全控制,请使用Flot。

If you don't recognize yourself above, go with Google Visu. 如果您不认识自己,请使用Google Visu。 It's easy to learn and implement, very well documented and extremely powerful. 它易于学习和实施,记录良好且功能强大。

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. 不在您的列表中,但我建议您查看Highcharts http://www.highcharts.com/ Highcharts是SVG,因此,它比Flot更具动态性,您可以使用CSS重新设置图形,附加事件,执行动画等...它也兼容IE6,它在服务器端工作(thx到Batik)我目前正在构建图形密集型应用程序,并在经过大量基准测试后选择了Highcharts。 I don't regret my choice. 我不后悔自己的选择。

There is jqPlot (http://www.jqplot.com/), an open source project which looks good. 有jqPlot(http://www.jqplot.com/),一个看起来不错的开源项目。 Based on jQuery as well. 基于jQuery也是如此。 I will give jqPlot a try, jQuery flot seems to be inactive. 我会试试jqPlot,jQuery flot似乎是不活跃的。

The piwik project uses the Open Flash Chart (not on your list). piwik项目使用Open Flash Chart (不在您的列表中)。

It's easy to use, has plenty of working examples very user friendly. 它易于使用,有大量工作示例非常用户友好。

I am a user of Flot, and a big fan. 我是Flot的用户,也是一个忠实粉丝。 I use it in a Grails application, and use stacked bar, line, and pie charts, including time-series and a bunch of interactive capabilities (ie turn off / on series with checkboxes, etc). 我在Grails应用程序中使用它,并使用堆积条形图,折线图和饼图,包括时间序列和一系列交互功能(即关闭/打开带复选框的系列等)。

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). 我发现整体工作很愉快,觉得API很发达(我看到其他一些JS图表库采用了API,所以你甚至可以灵活地转移到另一个套件中未来)。 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). 从现在看谷歌API一分钟,我想我喜欢flot更好(虽然谷歌也有能力传递一系列,没有从样本中看到它)。

They just came out with a new version a few weeks ago (0.6), that supports plugins, which I expect will stimulate more innovation. 他们刚刚在几周前发布了一个新版本(0.6),它支持插件,我希望这会刺激更多的创新。

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. 似乎Visualization与GWT集成在一起,因此如果您正在考虑使用它,可视化就是可行的方法。 On the other hand, if you are thinking of using JQuery for AJAX, then Flot might be a more natural fit. 另一方面,如果您正在考虑将JQuery用于AJAX,那么Flot可能更适合。

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. 当我决定使用它时,似乎谷歌没有交互式可视化,只有谷歌图表(图像),这是我使用Flot的原因之一。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM