简体   繁体   English

网络图中的边界节点组?

[英]Bordered group of nodes in a network graph?

I am attempting to implement a network graph using Vis JS library and would like to implement a group of nodes that are inside a logical group (box). 我正在尝试使用Vis JS库实现网络图,并希望实现逻辑组(框)内的一组节点。 VisJS allows grouping of nodes but is not implemented in a visual way that I am looking for. VisJS允许对节点进行分组,但未以我正在寻找的可视方式实现。

Another library that executes this perfectly is GoJS: http://gojs.net/latest/samples/basic.html Another example from VisJS that shows network graph I would like to implement, but no example in documentation: http://visjs.org/docs/img/vis_overview.png 另一个可以完美执行此操作的库是GoJS: http ://gojs.net/latest/samples/basic.html VisJS的另一个示例,它显示了我想实现的网络图,但文档中没有示例: http:// visjs。 org / docs / img / vis_overview.png

I would like to have nodes placed into larger boxes to represent the group of nodes. 我希望将节点放置在较大的框中以表示节点组。

Any ideas or suggestions for implementing this? 有什么想法或建议来实现这一目标?

I'm the developer of the network module of vis. 我是vis网络模块的开发人员。 Our apologies for not seeing this issue sooner, but most of our communication is done through GitHub. 很抱歉没有尽快看到这个问题,但是我们的大部分沟通都是通过GitHub完成的。

On the upside, since the release of v4 we support render events. 从好的方面来看,自v4发行以来,我们支持渲染事件。 You can use these to draw whatever you want on the canvas, including borders behind groups of nodes. 您可以使用它们在画布上绘制任何想要的东西,包括节点组后面的边框。 Take a look at the example: 看一下示例:

http://visjs.org/examples/network/events/renderEvents.html http://visjs.org/examples/network/events/renderEvents.html

Keep in mind that this is aesthetic only. 请记住,这仅是美观。 The physics engine will not compartmentalise these boundaries so the nodes may interact with the others. 物理引擎不会分隔这些边界,因此节点可以与其他节点交互。

We often hear this request from people who want to use vis network as a flow editor. 我们经常听到想要使用vis network作为流编辑器的人的请求。 Even though this is not your issue Id like to point out that this is not what we designed the network for. 即使这不是您的问题,我也想指出这不是我们为网络设计的目的。 We may have a module for this in the future though. 不过,将来我们可能会为此提供一个模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Vis.js网络图的节点中增加标签填充? - How to increase label padding in the nodes of a Vis.js network graph? 如何在Vis.js的网络图中提取节点的标题 - How to extract a title of nodes in Network graph in Vis.js 如何使用javascript实现网络图中节点之间的互连? - How to implement the interconnection between nodes in network graph using javascript? 创建具有扩展节点的集群网络力导向图 - Creating a clustered network force directed graph with expanded nodes 是否有包含没有链接的节点的 d3.network 图? - Is there a d3 network graph that includes nodes that don't have links? 如何使用DIV作为节点编写简单的d3.js网络图 - How to code a simple d3.js network graph using DIVs as nodes D3.js网络图,使用力导向布局和节点矩形 - D3.js network graph using force-directed layout and rectangles for nodes 如何在 D3.js 中的网络图的矩形节点内添加文本? - how to add text inside a rectangular nodes for a network graph in D3.js? 你如何阻止节点在 vis js 网络图中摆动到位? - How do you stop the nodes from wobbling into place in a vis js network graph? 如何在网络中按节点组应​​用节点缩放? Visjs库 - How can I apply node scaling per group of nodes in a network? Visjs library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM