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:
- How do spread the nodes out enough to fill the page or at least to not overlap so much?
- 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…)?
- 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