Skip to content

StateNetworkOptions

Defined in: network/network.ts:818

Options for Network.stateNetwork (#171). The engine ingests a state network + a per-state-node module assignment, derives the physical network’s overlapping-module pie wedges + module colours, and lets you toggle the state ↔ physical view with Network.view.

optional color?: ModuleColorOptions

Defined in: network/network.ts:839

The engine’s own module colour scheme (shared by node colours and pie wedges), used while the style sets no nodeFill. To colour modules with your own palette in every view, set style({ nodeFill: { by: "module", color } }) instead (#494).

moduleColors


optional lump?: boolean

Defined in: network/network.ts:848

Lump each physical node’s state nodes in one leaf module into one node in the state and both views (#529), as the map equation codes them. Without modules every state node is in the root module, so each physical node’s state nodes are one node: the state view draws the physical network. The physical view is the same either way. Toggle it with Network.lump. Default false.

lumpStateGraph


optional moduleLinks?: ArrayLike<ModuleLink>

Defined in: network/network.ts:833

Module-level links of the state-node module hierarchy modules (#533), addressed by path, as data(graph, { modules, moduleLinks }) takes them (NetworkDataOptions.moduleLinks): an Infomap state .ftree stores its leaf links only inside bottom modules and every coarser link once, in its *Links sections. The state view draws exactly these links between its modules, and its layouts pull along them, as for a plain network. The physical and both views have none: their modules overlap, so a module link has no single physical endpoint there. Lumped (lump), a module endpoint keeps its path and a leaf endpoint, a state node, becomes the lump that holds it. Requires modules; stateNetwork() checks up front that every endpoint is a module or leaf of that hierarchy and throws otherwise.

ModuleLink


optional modules?: ArrayLike<ModulePathNode>

Defined in: network/network.ts:822

Per-state-node module records (Infomap’s nodes shape; id = state-node index). Drives module colours (every view) and the physical view’s overlapping-module pie wedges. Optional (#494): a raw state network (before Infomap) still switches views, with no pies and the plain node fill.


optional pie?: PieWedgeOptions

Defined in: network/network.ts:835

Pie-wedge derivation options (grouping level, flow vs count sizing).

physicalPieWedges


optional rosetteRadius?: number

Defined in: network/network.ts:853

Radius (world units) of the rosette of state nodes around their physical node that the state view’s layout starts from when the state view is first shown after the physical layout (#495). Default: auto — a third of the physical layout’s spacing. (The "both" view’s rosette fills its containers instead.)

rosettePositions


optional view?: "state" | "physical" | "both"

Defined in: network/network.ts:841

Which view to show first. Default "physical" (so the overlapping-module pie glyphs are visible).