Node clustering with Cytoscape.js

99封情书 提交于 2019-12-25 09:27:41

问题


Does anyone know if it is possible to do clustering in the way that vis.js supports it with cytoscape.js? Here are some examples:

http://visjs.org/examples/network/other/clusteringByZoom.html

http://visjs.org/examples/network/other/clustering.html

The basic idea is that a node can represent a cluster of child nodes and zooming or double clicking on the node will "explode" it to show all the children.


回答1:


You can achieve the same effect using cy.on('zoom') with cy.add() and cy.remove(). That sort of feature would not be included in the lib proper, because it breaks graph semantics.



来源:https://stackoverflow.com/questions/42441913/node-clustering-with-cytoscape-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!