How to use the sigma.js function in sigma

To help you get started, we’ve selected a few sigma examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webpack / analyse / app / graphs / chunks.js View on Github external
color: color
	});
});
app.stats.chunks.forEach(function(chunk) {
	chunk.parents.forEach(function(parent) {
		edges.push({
			id: "edge" + chunk.id + "-" + parent,
			source: "chunk" + parent,
			target: "chunk" + chunk.id,
			arrow: "target",
			type: "arrow",
			size: chunk.parents.length
		});
	});
});
var s = new sigma({
	graph: {
		nodes: nodes,
		edges: edges
	},
	renderer: {
		type: "canvas",
		container: element
	},
	settings: {
		edgeColor: "target",
		maxNodeSize: 20,
		minNodeSize: 4,
		maxEdgeSize: 3,
		minEdgeSize: 1
	}
});
github webpack / analyse / app / graphs / modules.js View on Github external
sourceModule: parentModule,
			source: "module" + parentModule.uid,
			targetModule: module,
			targetModuleUid: module.uid,
			target: "module" + module.uid,
			arrow: "target",
			type: async ? "dashedArrow" : "arrow",
			lineDash: module.chunks.length === 0 ? [2] : [5],
			originalColor: edgeColor,
			color: edgeColor,
			size: weight,
			weight: async ? weight / 4 : weight
		});
	});
});
var s = new sigma({
	graph: {
		nodes: nodes,
		edges: edges
	},
	renderer: {
		type: "canvas",
		container: element
	},
	settings: {
		edgeColor: "target",
		maxNodeSize: 4,
		minNodeSize: 4,
		maxEdgeSize: 2,
		minEdgeSize: 0.05
	}
});

sigma

A JavaScript library aimed at visualizing graphs of thousands of nodes and edges.

MIT
Latest version published 4 days ago

Package Health Score

92 / 100
Full package analysis