Controls
Analysis
Layout
Actions
Suggested Concepts
Help

Push buttons to show graph features and click nodes to see details.

Use zoom controls to zoom and click & drag to move the graph.

Graph Statistics
Nodes: Edges: Density: Avg Deg:
if (this.activeSizeViz === type) { this.resetSizes(); this.activeSizeViz = null; if (this.renderer) this.renderer.refresh(); return; } this.resetSizes(); this.activeSizeViz = type; if (!graphologyLibrary.metrics) return alert("Metrics library not loaded."); if (type === 'pagerank') { const scores = graphologyLibrary.metrics.centrality.pagerank(this.graph); const minScore = Math.min(...Object.values(scores)); const maxScore = Math.max(...Object.values(scores)); this.graph.forEachNode((node) => { // User Request: Ensure min size is 6px (reduced again) this.graph.setNodeAttribute(node, "size", 6 + ((scores[node] - minScore) / (maxScore - minScore)) * 14); }); } else if (type === 'degree') { const scores = graphologyLibrary.metrics.centrality.degree(this.graph); const minScore = Math.min(...Object.values(scores)); const maxScore = Math.max(...Object.values(scores)); this.graph.forEachNode((node) => { // User Request: Ensure min size is 6px (reduced again) this.graph.setNodeAttribute(node, "size", 6 + ((scores[node] - minScore) / (maxScore - minScore)) * 14); }); } if (this.renderer) this.renderer.refresh(); }, runLayout(layoutName) { this.layout = layoutName; const lib = window.graphologyLibrary; if (!lib) return; if (layoutName === 'forceatlas2') { if (lib.layoutForceAtlas2) { lib.layoutForceAtlas2.assign(this.graph, { iterations: 50, settings: { gravity: 1 } }); } } else if (layoutName === 'circular') { if (lib.layout && lib.layout.circular) lib.layout.circular.assign(this.graph); } else if (layoutName === 'random') { if (lib.layout && lib.layout.random) lib.layout.random.assign(this.graph); } else if (layoutName === 'noverlap') { if (lib.layoutNoverlap) lib.layoutNoverlap.assign(this.graph); } if (this.renderer) { this.renderer.refresh(); this.renderer.getCamera().animatedReset(); } }, toggleStats() { this.showStats = !this.showStats; if (this.showStats) { this.stats.nodes = this.graph.order; this.stats.edges = this.graph.size; this.stats.density = graphologyLibrary.metrics.graph.density(this.graph).toFixed(4); this.stats.avgDegree = ((2 * this.stats.edges) / this.stats.nodes).toFixed(2); } } })); });