NodeFillSpec
NodeFillSpec =
string| ((index,graph) =>string) | {by:NodeMetric;scale: (value) =>string; } |ModuleFillSpec
Defined in: network/glyphs.ts:715
How node fill colour is determined. Resolved once per style() call to a per-node RGBA buffer (or one
colour), so every form is free at draw time.
string— one CSS colour for every node.- function —
(index, graph) => cssColour, e.g. a categorical palette keyed by module. An LOD aggregate takes the (chroma-weighted hue) mean of its members’ colours, so a module keeps its hue. { by, scale }— feed a NodeMetric through a colour scale (a bare d3 colour scale fits):{ by: "flow", scale: scaleSequential(interpolateViridis).domain([0, maxFlow]) }. An LOD aggregate is filled withscaleof its aggregated metric, summed like NodeRadiusSpec’s{ by }(so a module reads as its total flow). A spatial-tree cell is a region, not a unit of the metric, so it keeps its members’ colour mean — as its radius stays area-additive.{ by: "module", color? }— a colour per module, from the hierarchy the engine holds (#494); withoutcolor, the style’smoduleColor:data(graph, { modules }), or a state network’smodules(stateNetwork()). A node takes its enclosing module’s colour,color(path)withpaththe node’s module path minus its own rank (the 1-based chain,[]for a node in no module), as moduleColors colours. In a state network, a physical node (its disc, or its both-view container) takes its dominant module at the pie level, the one holding most of its flow (a tie goes to the lower module), and each pie wedge its own module (see PieWedgeOptions.level).coloris asked once per module, not per node;undefined(a module the palette has no colour for), and every node of a network without a hierarchy, take the default fill. An LOD aggregate that is a module (a module tree’s) takes that module’s own colour,color(its path); one that is not (a spatial or structural tree’s) takes its members’ colour mean, as with an accessor.