NetworkStyle
Defined in: network/network.ts:16
Visual style. Link appearance accessors arrive with the link pass (#100 N2.2).
Properties
Section titled “Properties”arrowSize?
Section titled “arrowSize?”
optionalarrowSize?:number
Defined in: network/network.ts:70
Arrowhead size (world units) for directed linkStyle:"line" links. Default 3 × linkWidth.
directed?
Section titled “directed?”
optionaldirected?:boolean
Defined in: network/network.ts:18
Render links with arrowheads. Defaults to the graph’s directed flag.
flowBorder?
Section titled “flowBorder?”
optionalflowBorder?:FlowBorderSpec
Defined in: network/network.ts:85
Flow-border ring (N6 / #104): draw each node/module as a disc with an outer ring whose width
encodes a per-node enter/exit flow (flow: an app Float32Array or a built-in metric) via
scale. Module aggregates sum their members’ flow over the same LOD cut. Fill/size still come
from nodeFill/nodeRadius (size by total flow with nodeRadius: { by: "flow", scale }). Omit
for plain filled nodes.
importance?
Section titled “importance?”
optionalimportance?:ImportanceSpec
Defined in: network/network.ts:33
Per-node declutter importance — which glyph wins when two overlap (the kept one). A
NodeMetric/accessor/Float32Array, or "order" (input order). Summed up the LOD tree, so a
module’s importance is its members’ total. Defaults to the nodeRadius size metric (biggest
wins), falling back to input order for a constant size.
linkBend?
Section titled “linkBend?”
optionallinkBend?:number
Defined in: network/network.ts:93
Bend links into curves (N6c / #104). For linkStyle:"line" this is the quadratic-bezier control
offset ⟂ to the chord as a fraction of chord length (try ~0.15; 0 (default) keeps links
straight). For linkStyle:"half-arrow" it is an absolute world-unit offset (the reference’s
bend, ~30); the bow side is derived from the link direction so a reciprocal A→B / B→A pair nests
around a shared centre curve instead of colliding.
linkStroke?
Section titled “linkStroke?”
optionallinkStroke?:LinkColorSpec
Defined in: network/network.ts:68
Link colour. A single CSS colour (default a light grey), or a (weight) => cssColour scale so
colour encodes the edge weight/flow (a bare d3 colour scale fits). The arrowhead always takes the
link’s colour — there is no separate arrow fill.
linkStyle?
Section titled “linkStyle?”
optionallinkStyle?:LinkStyle
Defined in: network/network.ts:54
How directed links are drawn (#104 N6). "line" (default) — a stroked line (straight, or bowed
by linkBend) plus a separate triangle arrowhead, as in the large-scale layout example.
"half-arrow" — the map-of-networks glyph: one filled shape per link that pinches to the
source centre and ends in a barbed arrowhead on the target node’s boundary, with reciprocal
A→B / B→A links nesting around a shared centre curve. (Half-arrow links are world-sized.)
linkWidth?
Section titled “linkWidth?”
optionallinkWidth?:LinkWidthSpec
Defined in: network/network.ts:62
Link width. A constant (default 1), a d3 scale of the edge weight — (weight) => width, e.g.
scaleSqrt().domain([0, maxWeight]).range([1, 6]) — or { by, scale } for parity with
nodeRadius (by is "weight"/"flow", the same per-edge quantity). A super-edge
applies the same scale to the accumulated weight of the edges it subsumes, so link thickness
reads as flow at every LOD level. Keep the scale’s range minimum ≥ 1 so links never vanish.
nodeBorder?
Section titled “nodeBorder?”
optionalnodeBorder?:object
Defined in: network/network.ts:46
Constant border ring (#104 rework): a fixed pixel outline on every node/module (e.g.
{ width: 1, color: "#fff" }). Independent of flowBorder (which encodes flow);
flowBorder wins if both are set.
color?
Section titled “color?”
optionalcolor?:string
width:
number
nodeFill?
Section titled “nodeFill?”
optionalnodeFill?:string| ((index,graph) =>string)
Defined in: network/network.ts:40
Node fill colour. A single CSS colour (default a medium blue), or a per-node
(index, graph) => cssColour accessor — e.g. a categorical palette keyed by module, so a
planted hierarchy reads as colour (#104 rework). Per-node colours propagate to LOD aggregates
(a collapsed module keeps its colour).
nodeRadius?
Section titled “nodeRadius?”
optionalnodeRadius?:NodeRadiusSpec
Defined in: network/network.ts:26
Node radius (world units). A constant number (default 4), a per-node Float32Array, a
(degree, index, graph) => radius accessor (a bare d3 scale fits — it receives the node’s
degree), or { by, scale } to size by a chosen metric ("degree" | "strength" | "flow" |
custom accessor) through any scale. Resolved once per call — no per-frame or rendering cost.
sizeMode?
Section titled “sizeMode?”
optionalsizeMode?:"world"|"screen"
Defined in: network/network.ts:77
"world" (default) — glyph sizes are in world units and scale with zoom. "screen" — sizes are
constant pixels regardless of zoom: the natural register for navigating a large layout (nodes
stay visible when zoomed out instead of going sub-pixel), and what LOD wants. nodeRadius /
linkWidth are then read as pixels. (Arrowheads stay world-sized for now, #103.)