人,都是視覺動物,好看我就用,太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
總結:在我看來,沒有最好的,只有最適合的,簡單使用即可