VISJS Graph Addon - usage questions

I have questions about how to properly use the VISJS graph addon. I am not a javascript expert. I’ve been reading some of the documentation for the original visjs library. Is there documentation for the Java version of this addon - for the API? I did not see anything but I may not be looking in the right place…

More specifically, I am building a graph composed of about 30-40 nodes. Each node has links to 2-4 other nodes in the system. Right now I am simply creating a set of Nodes and Edges and throwing them at a NetworkDiagram object. And it comes up on the screen. But the nodes overlap one another very closely - you can’t spread them out enough to see who is actually connected to whom. And the ‘gravity’ feature pulls nodes back together if I move them apart.

So my questions (and please tell me if this belongs on the visjs site, not here…) are fairly simple:

  1. How do spread the nodes out enough to fill the page or at least to not overlap so much?
  2. How can I move nodes around once they are displayed and not have them drift back to their original position (or something close to it…)?
  3. Is there a way to specify the length of the lines connecting the nodes - either for all nodes, or for a specific pair of nodes?

I have managed to create a couple of ‘Group’ objects, and was able to color 2 different groups of nodes.

Thanks very much,

nbc

I have tried setting the shape and mass of the nodes with the following code - but it seems to have no effect. How should I be doing this?

Node node = null;
Nodes nodeOptions = new Nodes();
netOptions = new Options();
nodeOptions.setMass(10);
nodeOptions.setShape(Shape.box);
netOptions.setNodes(nodeOptions);
netDiag = new NetworkDiagram(netOptions);

This seems to have no effect on the gravity, and the shapes remain ellipses. If I create my nodes using the constructor that sets the shape to ‘box’, that does work…

Need some information on this… Thanks