人,都是视觉动物,好看我就用,太low就pass,因此前端的图表类组件就有了他不可忽视的地位~ 在 JS 程序中,为了实现漂亮的图形、图表和数据可视化,我们选择使用开源库。生活在数据爆炸的时代,我们开发的每一个应用程序几乎都使用或者借助数据来提升用户体验。为了帮助你轻松地为你最喜欢的应用程序添加漂亮的数据可视化
本人推荐Echarts - 简单有Demo
原因:
1、可以进行本地构建Demo & API,这解决了好多内网使用者;
2、使用起来Soeasy
star 数:30K
百度的 Echarts 项目是一个基于浏览器的交互式图表和可视化库。它是用纯 JavaScript 编写的,基于 zrender 画布。它支持以画布、SVG(4.0+) 和 VML 的形式绘制图表。除了 PC 和移动浏览器外,ECharts 还可以与 node 上的 node-canvas 一起使用,以便进行高效的服务器端渲染(SSR)。
这里是完整的示例库:
http://echarts.baidu.com/echarts2/doc/example.html
项目地址:
https://github.com/apache/incubator-echarts
下面就看一下今年最火的几款js图标库
1. D3js
star 数:80K
例子 :https://github.com/d3/d3/wiki/Gallery
项目地址:https://github.com/d3/d3/
2. ChartJS
star 数:40K
项目地址:https://cdnjs.com/libraries/Chart.js
3. ThreeJS
star 数:45K
项目地址:https://github.com/mrdoob/three.js/
4.Highcharts(3种,图表-股票图-地图)
star 数:8K
项目地址:
https://github.com/highcharts/highcharts
5. Metric-Graphics
star 数:7K
示例库:https://metricsgraphicsjs.org/examples.htm
项目地址:https://github.com/metricsgraphics/metrics-graphics
6. Recharts
项目地址:https://github.com/recharts/recharts
7.Raphael
star 数:10K
项目地址:https://github.com/DmitryBaranovskiy/raphael
8.C3js
star 数:8K
看看这些例子:https://c3js.org/examples.html
项目地址:https://github.com/c3js/c3
9. React Vis
star 数:4K
项目地址:https://github.com/uber/react-vis
10.React Virtualized
star 数:12K
项目地址:https://github.com/bvaughn/react-virtualized
11.Victory
star 数:6K+
项目地址:https://github.com/FormidableLabs/victory
12. CartoDB
star 数:2K
项目地址:https://github.com/CartoDB/cartodb
13.Raw graphs
star 数:5K
例子:https://rawgraphs.io/gallery/
项目地址:https://github.com/densitydesign/raw
14. Metabase
star 数:11K+
项目地址:https://github.com/metabase/metabase
15. tauCharts
star 数:2K
项目地址:https://github.com/TargetProcess/tauCharts
总结:在我看来,没有最好的,只有最适合的,简单使用即可