使用Cytoscape.js进行节点集群 [英] Node clustering with Cytoscape.js

查看:179
本文介绍了使用Cytoscape.js进行节点集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道是否有可能以vis.js支持cytoscape.js的方式进行聚类?以下是一些示例:

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.

推荐答案

使用 cy.on('zoom') cy.add()可以达到相同的效果 cy.remove()。此类功能不会包含在lib库中,因为它破坏了图的语义。

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.

这篇关于使用Cytoscape.js进行节点集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆