Skip to content

FlowBorderShare

Defined in: network/glyphs.ts:410

The share flow-border mode (#510): the flow border covers the node’s exit-flow share — its exit flow e (FlowBorderBase.flow) over its flow f (the graph’s node flow, NetworkGraph.flow) — as a share of its area. A node of radius r keeps an inner disc of radius r · √(1 − e/f), with e/f clamped to [0, 1]: e = f covers the whole node, e = f/2 half its area, e = 0 draws no border, and f = 0 or a missing value (no node flow, NaN) draws none. The share does not depend on the radius, so it reads the same in both size modes and on a capped aggregate.

An LOD aggregate takes its members’ summed exit flow over their summed flow; a module of the engine’s hierarchy with a FlowBorderBase.moduleFlow value takes that exit flow over its summed flow. In a state network each view takes its own graph’s node flow: a physical node’s share is its exit flow over its flow (the sum of its state nodes’ flow).

optional color?: string | ((value, index, graph) => string)

Defined in: network/glyphs.ts:436

Ring colour: a single CSS colour, or a per-node (value, index, graph) => cssColour accessor so the ring colour can also encode the per-node metric (a bare d3 colour scale fits — value is the node’s flow metric). An LOD aggregate of a module or structural tree gets the value its ring draws (its module value, else its members’ sum) with index -1; a spatial-tree cell takes the highest-flow node’s colour. Omitted (default): a darker shade of each glyph’s own fill — so a module aggregate’s ring is a darker shade of its module colour, not one shared colour.

FlowBorderBase.color


optional flow?: Float32Array<ArrayBufferLike> | NodeMetric

Defined in: network/glyphs.ts:427

Per-node enter/exit flow driving the border width: a caller Float32Array (length nodeCount) or a built-in NodeMetric. Summed over members for module aggregates. In the share mode it is the exit flow, divided by the node’s flow.

Optional when moduleFlow is given (#471) — for input that has each module’s flow but no per-node value, such as an Infomap .ftree. Then a node draws no ring, a module draws its moduleFlow value, and a module without one draws none: nothing is summed from values that do not exist. One of flow and moduleFlow is required.

FlowBorderBase.flow


optional moduleFlow?: (path) => number | undefined

Defined in: network/glyphs.ts:446

A module’s own enter/exit flow, by its Infomap path (e.g. [2, 1] = sub-module 1 of top module 2; [] = the root). Read for the aggregates of a module hierarchy the engine holds (data(graph, { modules }), drawn by the default lod() source "modules"): a module with a value draws its ring from it instead of its members’ sum — which overstates a higher-level module, since it also counts the flow between its own submodules. Return undefined to keep the sum for a module. Aggregates that are not modules (the "structure" / "spatial" sources) always sum. Called once per module when the style is resolved against the tree, never per frame.

readonly number[]

number | undefined

FlowBorderBase.moduleFlow


optional scale?: undefined

Defined in: network/glyphs.ts:412


share: true

Defined in: network/glyphs.ts:411