本文主要是介绍基于Web应用的网络数据可视化方案,这类可视化方案众多,本文精选了一些相对典型的方案,供各位大佬参考。有些链接可能无法访问,请自备梯子。篇幅有限,欢迎补充。
目录
1. Echarts
https://echarts.apache.org
Echarts有好几种类型的图标可以用来丛网络数据的可视化,主要类型如下:
- Echarts—类型1 (https://echarts.apache.org/examples/zh/editor.html?c=graph-simple)
这种类型的图标适合简单的有向关系图表示。
![](https://img-blog.csdnimg.cn/88ac1e00adfc4413be42d655fd855c3a.png)
- Echarts—类型2 (https://echarts.apache.org/examples/zh/editor.html?c=graph-force)
这是力引导布局的例子,对于需要进行稀疏排列的场景可以考虑用这种。
![](https://img-blog.csdnimg.cn/7d340041ccc3497ea6798caaa7f60ebf.png)
- Echarts—类型3 (https://echarts.apache.org/examples/zh/editor.html?c=graphgl-large-internet&gl=1&theme=dark)
和力引导布局图类似,这种类型的图适合展示大规模网络数据,并且很好的平衡网络规模和渲染性能。
![](https://img-blog.csdnimg.cn/392439e7020641ed97619ff4e38806a4.png)
- Echarts—类型3 (https://echarts.apache.org/examples/zh/editor.html?c=graph-label-overlap)
这种图可以显示依赖关系,自动高亮邻近连接关系和显示节点权重。
![](https://img-blog.csdnimg.cn/3d85484951a7438894fa11dc29a9c0bf.png)
![](https://img-blog.csdnimg.cn/072a6ccae07948fabf7dbfc075297aca.png)
- Echarts—类型4 (https://echarts.apache.org/examples/zh/editor.html?c=graph-circular-layout)
环形布局,对于节点数较少的情况用这种比较合适,表现形式更加美观。
![](https://img-blog.csdnimg.cn/4417790eec8a4fceb0abcd55d67c61d5.png)
- Echarts—类型5 (https://echarts.apache.org/examples/zh/editor.html?c=tree-basic)
这种图属于树状图,适合用在具有非常明确的上下级分层,并且没有横向关联的网络数据类型。
![](https://img-blog.csdnimg.cn/6b5fc9aa7f7e47a78b1e989bd9d5ba06.png)
![](https://img-blog.csdnimg.cn/6847f816392a408fa03ad5196da603f1.png)
- Echarts—类型6 (https://echarts.apache.org/examples/zh/editor.html?c=lines3d-flights-gl&gl=1)
这种图能够使用在具有地理位置的节点网络场景,但是数据量不能太大,对于大量数据,图形渲染和刷新将会非常卡顿。
![](https://img-blog.csdnimg.cn/36bf17c2a4cf4110b42e916a7e702d6d.png)
![](https://img-blog.csdnimg.cn/349df1fcec8248f69752394157646dfd.png)
- Echarts—类型7 (https://echarts.apache.org/examples/zh/editor.html?c=linesGL-ny&gl=1)
对于和路网相关的网络数据,可以使用本例子,展现了Echarts对于处理大量路网信息的强大性能。
![](https://img-blog.csdnimg.cn/dae25e6861974e2fb641384d6cdc5a14.png)
2. G6
https://g6.antv.vision
G6相较于Echarts也具有非常丰富的展示类型,和网络相关的主要包括一下几种:
- G6—类型1 (https://g6.antv.vision/zh/examples/case/graphDemos#graphinsight)
适用于非树嵌套结构的、可能存在环路的数据结构展示。
![](https://img-blog.csdnimg.cn/2fa08a3dfc084c0dbc3d70bd98029d8d.png)
![](https://img-blog.csdnimg.cn/b1f5871859504b38846efc3258a5815f.png)
- G6—类型3 (https://g6.antv.vision/zh/examples/case/graphDemos#edgeBundling)
这是美国迁徙图边绑定的例子,这种类型的图体现了三个方面的信息:1、节点的方向,输入或者输出;2、节点规模,通过节点的大小体现;3、输入输出的比例,通过节点的饼状图可以直观看出。
![](https://img-blog.csdnimg.cn/87557757d20947539836ab4e64dc69ef.png)
![](https://img-blog.csdnimg.cn/596c52a59a604e739bef4f76b441c4ac.png)
- G6—类型5 (https://g6.antv.vision/zh/examples/case/graphDemos#donutTransfer)
这种类型的图展示了四个方面的信息:1、节点的成份构成;2、节点规模;3、节点间通信方向;4、节点间流量大小。
![](https://img-blog.csdnimg.cn/11c452073c2a4897a167881dc2fa1cda.png)
- G6—类型6 (https://g6.antv.vision/zh/examples/case/graphDemos#customFlow)
这种类型的图标能够看出一个主线、和每个节点下的分类信息,以及每个节点在各个分类的大致覆盖情况。
![](https://img-blog.csdnimg.cn/8f3587b86c48491e9d402d2e70d23346.png)
![](https://img-blog.csdnimg.cn/b198071287f0471a8f3ecf4b4a6bb98d.png)
- G6—类型8 (https://g6.antv.vision/zh/examples/case/others#metroLines)
这种是交通网络图,能够体现地理位置、动态的路网流量动画,节点状态动画。
![](https://img-blog.csdnimg.cn/41afe4cd5de94384b849081e2c2f54b8.png)
![](https://img-blog.csdnimg.cn/7da34b686f0d425fb1fed5bc0727c1a6.png)
- G6—类型10 (https://g6.antv.vision/zh/examples/interaction/hull#hull)
轮廓包装图,适合对网络节点进行分类。
![](https://img-blog.csdnimg.cn/4363b5c585bb455e9b78174d4ebd1728.png)
3. L7
- L7—类型1 (https://l7.antv.vision/zh/examples/gallery/animate#plane_animate)
类似Echarts的飞线图,体现了地理位置,节点动画,节点连接信息流动方向。
![](https://img-blog.csdnimg.cn/66de5606ccdb41a8b94cc63ed240508c.png)
- L7—类型2 (https://l7.antv.vision/zh/examples/gallery/animate#turin)
体现了节点之间的信息流动精细轨迹。
![](https://img-blog.csdnimg.cn/81f7c21719d94e70a516ef118238df79.png)
- L7—类型3 (https://l7.antv.vision/zh/examples/earth/arc3d#flyline)
3D地理节点数据飞线,可以体现出节点位置、信息流动方向。
![](https://img-blog.csdnimg.cn/29091298daee43e189f4c9ae46e737a9.png)
4. L7Plot
- L7Plot—类型1 (https://l7plot.antv.vision/zh/examples/path/path#beijingMetro)
体现了交通路网的地理位置,节点连线的差异化。
![](https://img-blog.csdnimg.cn/2d26ef483c65472abd2f756b169d6fbf.png)
- L7Plot—类型2 (https://l7plot.antv.vision/zh/examples/flow/flow#ground-flow)
体现了节点的地理位置、节点状态动画、节点连线的信息流动方向动画。
![](https://img-blog.csdnimg.cn/b31b8a337fe64b209b32ba0221c96305.png)
5. F6
https://f6.antv.vision
F6主要是针对移动端的可视化工具,和G6类似,但是考虑充分考虑了移动端对于GPU的不同需求。
![](https://img-blog.csdnimg.cn/2cda148131264db5a54a0c05a095fa0b.png)
![](https://img-blog.csdnimg.cn/7747791b32664209b3e7fbd8d670430b.png)
- F6—类型3 (https://f6.antv.vision/zh/docs/examples/net/forceDirected)
力导向布局图。 -
- F6—类型4 (https://f6.antv.vision/zh/docs/examples/net/circular)
![](https://img-blog.csdnimg.cn/cb31f45db5b046f3910575296912a299.png)
- F6—类型5 (https://f6.antv.vision/zh/docs/examples/net/arcDiagram)
弧线图,体现少量点之间的网络关系。
![](https://img-blog.csdnimg.cn/de79312cba5b4fa8a2084799b495352b.png)
6. AVA
![](https://img-blog.csdnimg.cn/0aab92926107411dad8c79f544cd3387.png)
7. D3
https://observablehq.com/@d3/gallery
D3提供了非常底层的可视化API,给与开发者极大的自由度。这种高自由度的代价是,对于复杂图形的开发成本高。D3也作为很多可视化工具的基础库。
![](https://img-blog.csdnimg.cn/7d11145db1ef43f094ac046c3af3291f.png)
![](https://img-blog.csdnimg.cn/9f735abf86c449e1b37b6d0d5e65b9d6.png)
![](https://img-blog.csdnimg.cn/5d35a70c2e0e4f8ca60bad97b666823b.png)
![](https://img-blog.csdnimg.cn/48d3e4fe05be4e2f9be9fdc03e481c1d.png)
![](https://img-blog.csdnimg.cn/e48a0291c1a145ba84373b7f3bb61ce8.png)
![](https://img-blog.csdnimg.cn/1ded79a2d1504db28efdcff9f77454d7.png)
- D3—类型7 (https://observablehq.com/@d3/voronoi-labels)
泰森多边形又叫冯洛诺伊图(Voronoi diagram),得名于Georgy Voronoi,是一组由连接两邻点线段的垂直平分线组成的连续多边形。一个泰森多边形内的任一点到构成该多边形的控制点的距离小于到其他多边形控制点的距离。
![](https://img-blog.csdnimg.cn/37cdac69bac8471e90d96ba79ea7183c.png)
- D3—类型8 (https://observablehq.com/@d3/world-airports-voronoi)
世界机场节点和覆盖范围网络。
![](https://img-blog.csdnimg.cn/6078d0d0ab0e4907ab05190cc997e3c2.png)
- D3—类型9 (https://observablehq.com/@mbostock/stern-brocot-tree)
Stern-Brocot Tree是一种能将所有的最简分数都表示出来的结构
![](https://img-blog.csdnimg.cn/ad466f52c1b247c1b93a2d41733a4a4c.png)
8. Keylines
https://cambridge-intelligence.com/keylines
![](https://img-blog.csdnimg.cn/e5183b879adc4d409a164b86700a8988.png)
![](https://img-blog.csdnimg.cn/1cf0a354111e465692397f58684b68c7.png)
![](https://img-blog.csdnimg.cn/9880b866bd894e34a6d161d3740c3b38.png)
9. Vis.js
https://visjs.github.io/vis-network/examples
- Vis.js—类型1 (https://visjs.github.io/vis-network/examples/network/data/dynamicFiltering.html)
这种类型主要体现了节点之间的方向性。
![](https://img-blog.csdnimg.cn/8d06d00564574340b9662777d7c1e1ec.png)
![](https://img-blog.csdnimg.cn/c79ff6274ffa449eba8cc8d8ab1aa719.png)
![](https://img-blog.csdnimg.cn/262891823de4453cba2bb5952c7ba54c.png)
- Vis.js—类型4 (https://visjs.github.io/vis-network/examples/network/exampleApplications/neighbourhoodHighlight.html)
这个例子体现了节点和节点连线分组。
![](https://img-blog.csdnimg.cn/f1784e77606240c7970a4e03ef4d866c.png)
10. Sigma.js
![](https://img-blog.csdnimg.cn/22a2ce4fa43e44a281c84eded6cb01fc.png)
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ermPDOwE-1662366655879)(https://codesandbox.io/s/github/jacomyal/sigma.js/tree/main/examples/load-gexf-file)]](https://img-blog.csdnimg.cn/d18b5d5fad7b4b6ebb722a2cde097746.png"/>
![](https://img-blog.csdnimg.cn/5ac865d1c2ae4ad9b2cc749c8d37eb57.png)
![](https://img-blog.csdnimg.cn/9ab8003946534c57ad2e29128a9479ea.png)
- Sigma.js—类型4 (https://codesandbox.io/s/github/jacomyal/sigma.js/tree/main/examples/custom-rendering)
![](https://img-blog.csdnimg.cn/41afaf1a9ce64a659397ed31dde57c76.png)
11. Ogma
https://doc.linkurio.us/ogma/latest)
![](https://img-blog.csdnimg.cn/8b72499a8a254bbd9ba36bc921496f6b.png)
![](https://img-blog.csdnimg.cn/3ceab056bab346d6b388494f01db3a58.png)
![](https://img-blog.csdnimg.cn/4eb32a8e4b124a989fbbc7f1f70c9b37.png)
![](https://img-blog.csdnimg.cn/978cf98c38b54aa4b7f677d0078df8ca.png)
![](https://img-blog.csdnimg.cn/f60c04cf36964e18997b6b33d419e5fa.png)
![](https://img-blog.csdnimg.cn/608c840abfb4419ba37004f4d04a694a.png)
![](https://img-blog.csdnimg.cn/559fbf4b92c643c3bb8048684f62c8b1.png)
![](https://img-blog.csdnimg.cn/44f3a200da4a4a788e911862d2789c5d.png)
![](https://img-blog.csdnimg.cn/31edc3f0e69f40d19198efe7100546e2.png)
![](https://img-blog.csdnimg.cn/3ea6af3233674de4a2d1cb36a596f470.png)
![](https://img-blog.csdnimg.cn/739e5e1c2de04951a7788583b0ce10f9.png)
![](https://img-blog.csdnimg.cn/803e7680d3dc46c1bca2f78a0d2f8c36.png)
![](https://img-blog.csdnimg.cn/1edba8daa6f94614931c4c96afd11242.png)
![](https://img-blog.csdnimg.cn/a89b2d58fbc54198886a1812cce555ea.png)
12. Ngraph
https://github.com/anvaka/ngraph
![](https://img-blog.csdnimg.cn/a1b2d685beec4f13bfa673f79f99fd1e.png)
13. React-force-graph
https://github.com/vasturiano/react-force-graph
是一个3D视图的力引导布局的库。
![](https://img-blog.csdnimg.cn/3780fe47cb4d44378b0ed7cef5b4d14c.png)
![](https://img-blog.csdnimg.cn/dfd70c99413343ce989a6dfb4dae58f2.png)
![](https://img-blog.csdnimg.cn/0f0089225bb24f5190589e83b99f72d4.png)
![](https://img-blog.csdnimg.cn/10703aa249da4568804269fb9a8383c8.png)
![](https://img-blog.csdnimg.cn/777a550292534e4ea1ffa2d90cde5fea.png)
![](https://img-blog.csdnimg.cn/b944b2d85286425d9592766ca0ad04fd.png)
![](https://img-blog.csdnimg.cn/ef5e11a29edb40daa4da855f00c04ee9.png)
14. Cola.js
https://ialab.it.monash.edu/webcola/
![](https://img-blog.csdnimg.cn/3b18efe773e9476094c2bc8bb17afed2.png)
![](https://img-blog.csdnimg.cn/8ca61c646b964a57b5c8acf0f57bf233.png)
![](https://img-blog.csdnimg.cn/006afe944aec4843af5d4d75d5cb93df.png)
![](https://img-blog.csdnimg.cn/70b7949a1e1243a598043ad14c12b01f.png)
![](https://img-blog.csdnimg.cn/bcfa357a7f924d5c802e172809a502c6.png)
![](https://img-blog.csdnimg.cn/ebb4966cdde2423a82b181dd010e7d39.png)
![](https://img-blog.csdnimg.cn/b5810ab43b2e437f97b604933cd54380.png)
15. Cytoscape.js
https://js.cytoscape.org/
这是一个用纯JS编写的图形库,带有针对核心Cytoscape.js库和所有第一方扩展的开放源代码许可(MIT)。它在生产中的商业项目和开源项目中使用,并且首先面向用户(面向前端应用程序用例和开发人员用例)设计。它包括从BFS到PageRank的图论算法。一个非常适合做知识图谱的前端可视化图库。
![](https://img-blog.csdnimg.cn/7e4274a78fc7403b9c0aafa0defd6cbc.png)
![](https://img-blog.csdnimg.cn/5cebadc60e7f4796ac00f7e4959b4a9a.png)
![](https://img-blog.csdnimg.cn/93f01a6fde5249b2bafda5284476bba1.png)
![](https://img-blog.csdnimg.cn/0ac610cf1f5b415e89b864f63229eca9.png)
![](https://img-blog.csdnimg.cn/340ca0010e6d4ee08b91cd40e5b87f10.png)
![](https://img-blog.csdnimg.cn/000be8d545a74ec29238e009ec51e041.png)
16. dagre-d3
https://github.com/dagrejs/dagre-d3
![](https://img-blog.csdnimg.cn/c105326c09df4d24b78b11f262b5584f.png)
![](https://img-blog.csdnimg.cn/74d2b3f14dba489e94d0fafa00727b7f.png)
![](https://img-blog.csdnimg.cn/85727df48cdb4f35af8549f00cf0d00c.png)
17. ElGrapho
![](https://img-blog.csdnimg.cn/bf58b55f36ab4ccaa24cd298bec49f37.png)
![](https://img-blog.csdnimg.cn/f7e363f36bb44db78e3e918a9ffbae47.png)
![](https://img-blog.csdnimg.cn/3f6f1d8f5e844a468da297dffcec07d6.png)
18. GoJS
![](https://img-blog.csdnimg.cn/1d13deafd19043339da0dd2bae22050b.png)
![](https://img-blog.csdnimg.cn/9d7123b3ab79449ea41165b41d061f5e.png)
![](https://img-blog.csdnimg.cn/31d935898b3549f197c6145fcf557acc.png)
![](https://img-blog.csdnimg.cn/3e3956029e4245b3bd8604ef774884b8.png)
![](https://img-blog.csdnimg.cn/79e606e4be814434a9e3b4ef0de79836.png)
![](https://img-blog.csdnimg.cn/784edd25e3854b9caa707af0dd3dfe64.png)
![](https://img-blog.csdnimg.cn/1eb7d14ba2aa4f7e8172cdeafd257936.png)
![](https://img-blog.csdnimg.cn/69a6258088b34a99987943e1ced9556b.png)
![](https://img-blog.csdnimg.cn/5d89118b8c284bffbb037e12e1465420.png)
![](https://img-blog.csdnimg.cn/62c11add01fe4a95ab1822d2c30a9fb7.png)
19. Jointjs
https://resources.jointjs.com/
![](https://img-blog.csdnimg.cn/bf73a394431c4d2280d8fa5dfd65ddff.png)
![](https://img-blog.csdnimg.cn/0e34ab39d00c424e8ff2692a9ec9a79d.png)
![](https://img-blog.csdnimg.cn/cde651c711a940aeb2de77adc536855f.png)
![](https://img-blog.csdnimg.cn/c4149bcb67e640f8914a487374152880.png)
![](https://img-blog.csdnimg.cn/045b8fe9b1294717b2cdc3709f5c0a37.png)
![](https://img-blog.csdnimg.cn/6a8a74e738ce4e31935c9395d2972b47.png)
![](https://img-blog.csdnimg.cn/40139d71a3764606aa5500119e520d1f.png)
![](https://img-blog.csdnimg.cn/da14648117bd4ee9be302e80622e29d4.png)
![](https://img-blog.csdnimg.cn/16069838acc84a65b973a7e9cc4175e1.png)
20. JavaScript InfoVis Toolkit
http://philogb.github.io/jit/demos.html
![](https://img-blog.csdnimg.cn/c02eec3a6fb5427ea2b56b2e54962fe0.png)
![](https://img-blog.csdnimg.cn/ca7310e266b54eb0b1a7fbcb7589048a.png)
![](https://img-blog.csdnimg.cn/1e149998f4934220a34ce691f94c05f7.png)
![](https://img-blog.csdnimg.cn/6657043c92164e44b41139c38245eaee.png)
![](https://img-blog.csdnimg.cn/30906e11626545858a90e750a479e06c.png)
21. jsPlumb
https://demo.jsplumbtoolkit.com
![](https://img-blog.csdnimg.cn/a26dc5d0abd040e7b4561d5b1b36c2da.png)
![](https://img-blog.csdnimg.cn/69be851adb9a45c381bb2ce7166d2b20.png)
![](https://img-blog.csdnimg.cn/ed6d8da72a6c43fda6f4400625f4801c.png)
![](https://img-blog.csdnimg.cn/0f9ab9278c874a0fa28c1fb90afd8cc8.png)
![](https://img-blog.csdnimg.cn/0462a30c17c84b8ba3677b0ff89533d0.png)
参考资料
- Echarts (https://echarts.apache.org)
- G6 (https://g6.antv.vision)
- L7 (https://l7.antv.vision)
- L7Plot (https://l7plot.antv.vision)
- F6 (https://f6.antv.vision)
- AVA (https://ava.antv.vision)
- D3
- Keylines
- Vis.js
- Sigma.js (https://www.sigmajs.org/)
- Ogma (https://doc.linkurio.us/ogma/latest/)
- Ngraph (https://github.com/anvaka/ngraph)
- React-force-graph (https://github.com/vasturiano/react-force-graph)
- A Comparison of Javascript Graph Network Visualisation Libraries
- Cola.js (https://ialab.it.monash.edu/webcola)
- Cytoscape.js (https://js.cytoscape.org/)
- dagre-d3 (https://github.com/dagrejs/dagre-d3)
- ElGrapho (https://www.elgrapho.com/)
- GoJS (https://gojs.net.cn)
- Jointjs (https://resources.jointjs.com)
- JavaScript InfoVis Toolkit (http://philogb.github.io/jit/demos.html)
- jsPlumb (https://demo.jsplumbtoolkit.com)