MaxBeauchemin
4/22/2020 - 8:57 PM

Sigma JS - Graph Visualization

var sigmaInstance = new sigma('graphContainer');
            
sigmaInstance.graph.addNode({
	id: 'A',
	label: 'A',
	x: 0,
	y: 0,
	size: 1,
	color: '#ff0000'
});

sigmaInstance.graph.addNode({
	id: 'B',
	label: 'B',
	x: 10,
	y: 0,
	size: 1,
	color: '#ff0000'
});

sigmaInstance.graph.addEdge({
	id: 'E1',
	source: 'A',
	target: 'B',
	type: 'arrow',
	size: 20
});

sigmaInstance.refresh();