有没有人会推荐一个特别的JavaScript图表库——特别是一个根本不使用flash的库?
当前回答
你所需要的就是原始图表
其他回答
dojo图表库中有很多活动,最棒的是,我在一个AIR应用程序中使用它也没有问题,非常酷! 例如http://www.sitepen.com/blog/2008/05/27/dojo-charting-event-support-has-landed/
尝试PlotKit
我推荐gRaphaël的纯JavaScript图表以及它所构建的纯JavaScript矢量图形库(Raphaël)。
gRaphaël目前支持Firefox 3.0+, Safari 3.0+, Opera 9.5+和Internet Explorer 6.0+。
我最近正在寻找一个javascript图表库,我评估了一大堆,最后确定了jqplot,它非常符合我的要求。正如Jean Vincent的回答所提到的,你需要在基于canvas和基于svg的解决方案之间做出选择。
To my mind the major pros and cons were as follows. The SVG based solutions like Raphael (and offshoots) are great if you want to construct highly dynamic/interactive charts. Or if you charting requirements are very much outside the norm (e.g. you want to create some sort of hybrid chart or you've come up with a new visualization that no-one else has thought of yet). The downside is the learning curve and the amount of code you will have to write. You won't be banging out charts in a few minutes, be prepared to invest some real learning time and then to write a goodly amount of code to produce a relatively simple chart.
If your charting requirements are reasonably standard, e.g. you want some line or bar graphs or perhaps a pie chart or two, with limited interactivity, then it is worth looking at canvas based solutions. There will be hardly any learning curve, you'll be able to get basic charts going within a few minutes, you won't need to write a lot of code, a few lines of basic javascript/jquery will be all you need. Of course you will only be able to produce the specific types of charts that the library supports, usually limited to various flavors of line, bar, pie. The interactivity choices will be extremely limited, that is to say non-existent for many of the libraries out there, although some limited hover effects are possible with the better ones.
我使用了JQplot,这是一个基于画布的解决方案,因为我只需要一些标准类型的图表。从我的研究和各种选择中,我发现它的功能相当全面(如果你只追求标准图表),而且非常容易使用,所以如果你的要求相似,我会推荐它。
总而言之,简单且需要图表,然后使用JQplot。复杂/不同,时间不紧迫,那就和拉斐尔和朋友们一起去吧。
你所需要的就是原始图表
推荐文章
- 一元加/数字(x)和parseFloat(x)之间的区别是什么?
- angularjs中的compile函数和link函数有什么区别
- 删除绑定中添加的事件监听器
- 很好的初学者教程socket.io?
- HtmlSpecialChars在JavaScript中等价于什么?
- React: 'Redirect'没有从' React -router-dom'中导出
- 如何在React中使用钩子强制组件重新渲染?
- 我如何使用Jest模拟JavaScript的“窗口”对象?
- 我如何等待一个承诺完成之前返回一个函数的变量?
- 在JavaScript中根据键值查找和删除数组中的对象
- 使嵌套JavaScript对象平放/不平放的最快方法
- 如何以及为什么'a'['toUpperCase']()在JavaScript工作?
- 有Grunt生成index.html不同的设置
- 文档之间的区别。addEventListener和window。addEventListener?
- 如何检查动态附加的事件监听器是否存在?