visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.
https://visjs.github.io/vis-network/
Apache License 2.0
2.94k stars 362 forks source link

Arrange node groups #1258

Open gadepallivs opened 3 years ago

gadepallivs commented 3 years ago

We work on biological networks. These involve building network connections between 2 biological cells. For instance, in the example below we are trying to show interaction between 2 cell types. Their interaction mostly is by the proteins (receptors) that are on the cell-surface. I have 2 groups of nodes Group A ( Yellow) Group B (Blue). I am trying to segregate the nodes so that they can be visibly shown to user like in the image below. To achieve this currently from JS drew the canvas border. By default used tree arrangement of the network, got the node positions and changed the positions to + and - value. This basically helped to arrange all Group A on left side and Group B on the right side. But, what I would like to do is to set position for each node So that I can control where the nodes should arrange. For example, like in the image below. I want certain nodes to fall on the cell surface. Some in the center, and some around the center. Is there a way to achieve that ?

enter image description here

xmedeko commented 1 year ago

I need exacly same thing, place a group of nodes inside some shape, oval or rectangle. Is this duplicate or enhancement of #203 ?

gadepallivs commented 1 year ago

I need exacly same thing, place a group of nodes inside some shape, oval or rectangle. Is this duplicate or enhancement of #203 ?

I tried a custom arrangement, in this SO question, hope this is of some help. https://stackoverflow.com/questions/65989711/arrange-nodes-at-specific-location