Network family: nodes, links and analysis panels

Overview

Base Control: NetworkControl : MaterialControl
Namespace: Beep.Skia.Network

The NetworkControl is the root control for this diagram family. It inherits MaterialControl and provides shared port management, styling, and template methods for all nodes in the family.

This family contains 12 node types.

Node Types

Node ClassShapeDescription
NetworkNodeCircle with labelGraph node/vertex with position, size, color, and label.
NetworkLinkLine with weightWeighted edge between two nodes. Supports directed/undirected.
NetworkGraphN/A (data structure)Graph data structure: adjacency list, node/link management, serialization.
PathFinderN/A (algorithm)Shortest path algorithms: Dijkstra, A*, Floyd-Warshall.
CentralityMeasureN/A (algorithm)Node centrality: degree, betweenness, closeness, eigenvector, PageRank.
CommunityDetectorN/A (algorithm)Community detection: Louvain, label propagation, Girvan-Newman.
GraphNavigatorN/A (interaction)Graph exploration controls: zoom, pan, focus/unfocus, expand/collapse.
LayoutSelectorN/A (UI)Layout algorithm picker: force-directed, circular, hierarchical, grid, radial.
FilterPanelN/A (UI)Node/link filtering by attributes, degree threshold, community membership.
ExportPanelN/A (UI)Export graph as PNG, SVG, JSON, GEXF, GraphML.
NodeClusterGroup/hullVisual cluster grouping of related nodes with convex hull or bounding box.
NetworkAnalyzerN/A (algorithm)Graph statistics: density, diameter, clustering coefficient, modularity.

NetworkNode

Graph node/vertex with position, size, color, and label.

ShapeCircle with label
Input PortsFlexible
Output PortsFlexible

NetworkGraph

Graph data structure: adjacency list, node/link management, serialization.

ShapeN/A (data structure)
Input Ports0
Output Ports0

PathFinder

Shortest path algorithms: Dijkstra, A*, Floyd-Warshall.

ShapeN/A (algorithm)
Input Ports0
Output Ports0

CentralityMeasure

Node centrality: degree, betweenness, closeness, eigenvector, PageRank.

ShapeN/A (algorithm)
Input Ports0
Output Ports0

CommunityDetector

Community detection: Louvain, label propagation, Girvan-Newman.

ShapeN/A (algorithm)
Input Ports0
Output Ports0

GraphNavigator

Graph exploration controls: zoom, pan, focus/unfocus, expand/collapse.

ShapeN/A (interaction)
Input Ports0
Output Ports0

LayoutSelector

Layout algorithm picker: force-directed, circular, hierarchical, grid, radial.

ShapeN/A (UI)
Input Ports0
Output Ports0

FilterPanel

Node/link filtering by attributes, degree threshold, community membership.

ShapeN/A (UI)
Input Ports0
Output Ports0

ExportPanel

Export graph as PNG, SVG, JSON, GEXF, GraphML.

ShapeN/A (UI)
Input Ports0
Output Ports0

NodeCluster

Visual cluster grouping of related nodes with convex hull or bounding box.

ShapeGroup/hull
Input Ports0
Output Ports0

NetworkAnalyzer

Graph statistics: density, diameter, clustering coefficient, modularity.

ShapeN/A (algorithm)
Input Ports0
Output Ports0

Connection Points

Every node in this family exposes connection points (ports) for linking to other nodes. Port positions are computed lazily by LayoutPorts(), which runs when MarkPortsDirty() flags the layout as stale after a move or resize.

Node ClassInput PortsOutput PortsExtra
NetworkNodeFlexibleFlexible—
NetworkLink00—
NetworkGraph00—
PathFinder00—
CentralityMeasure00—
CommunityDetector00—
GraphNavigator00—
LayoutSelector00—
FilterPanel00—
ExportPanel00—
NodeCluster00—
NetworkAnalyzer00—

Connection Conventions

When building diagrams with this family, follow these conventions:

  • NetworkGraph is the primary data model; NetworkNode/NetworkLink are visual
  • Layout algorithms rearrange nodes to minimize edge crossings
  • Analysis components operate on the graph structure, not the visual layer

Usage Example

Complete example showing creation, node placement, and connection:

C# Example

var net = new NetworkControl
{
    X = 50, Y = 50,
    Width = 700, Height = 500
};
drawingManager.AddComponent(net);

var graph = new NetworkGraph();
var n1 = graph.AddComponent("A", x: 100, y: 100);
var n2 = graph.AddComponent("B", x: 250, y: 80);
var n3 = graph.AddComponent("C", x: 250, y: 180);
graph.AddLink(n1, n2, weight: 1.5);
graph.AddLink(n1, n3, weight: 2.0);
graph.AddLink(n2, n3, weight: 0.8);

var finder = new PathFinder(graph);
var path = finder.FindShortestPath(n1, n3);

var centrality = new CentralityMeasure(graph);
var scores = centrality.CalculateBetweenness();