NodeRadiusSpec
NodeRadiusSpec =
number|Float32Array| ((value,index,graph) =>number) | {by:NodeMetric;scale: (value) =>number; }
Defined in: network/glyphs.ts:31
How node radius is determined. Resolves once (per style() call) to a per-node Float32Array,
which is already a per-instance GPU attribute — so any of these forms is free at draw time.
number— one constant radius for every node.Float32Array— caller-supplied per-node radii (length must equalnodeCount); used as-is.- function —
(value, index, graph) => radius, wherevalueis the node’s degree. A bare d3 scale fits here directly:scaleSqrt().domain([1, maxDegree]).range([2, 20]). { by, scale }— feed a chosen metric through any scale:{ by: "strength", scale }. Use this to size bystrength/flow(or a custom accessor) with a reusable scale instead of degree.