'Where can I find the documentation for sigma.js?
I am trying to test the limits of sigma.js (v2) to determine whether it is a suitable option for our project. From what I have seen in various sample applications it looks very promising. Unfortunately, I am unable to find proper documentation.
All I can find are demo applications and some (seeming rather outdated) Wiki subpages (i.e. for Settings).
Basically, I need to know the feature set of SigmaJS, and I would like to not have to dig through the entire source code to do that ;)
What I am currently looking for:
What global settings can I pass Sigma when I do... ?
const sigmaRenderer = new Sigma(graph, container, settings);What node & edge properties are implemented in Sigma?
For example, I can set the coordinates, size, type and image like this:
graph.addNode("Node-A", { x: 0, y: 0, size: 10, type: "image", image: "my-image.png" })What else is possible? What other options for type are possible?
Where can I find a list of supported event listeners? What is the model of the returned object?
etc.
Is there an official, up-to-date documentation or wiki that I have missed?
Solution 1:[1]
Sigmajs is written in typescript, so a lot of information are directly available in types.
If you have an IDE that handles typescript, you see the auto-completion with what you can give to the constructor.
For the settings, you can take a look at this link https://github.com/jacomyal/sigma.js/blob/339be9ed274fcfb881ddd3585974ea7be46ca7dd/src/settings.ts#L34-L82
For attributes node, you can define :
x: number;
y: number;
image: string;
label: string | null;
size: number;
color: string;
hidden: boolean;
forceLabel: boolean;
zIndex: number;
type: string;
For events :
"clickNode",
"rightClickNode",
"downNode",
"enterNode",
"leaveNode",
"doubleClickNode",
"wheelNode",
"clickEdge",
"rightClickEdge",
"downEdge",
"enterEdge",
"leaveEdge",
"doubleClickEdge",
"wheelEdge",
"clickStage",
"rightClickStage",
"downStage",
"doubleClickStage",
"wheelStage",
"kill",
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
