Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

layerGradient

layerGradient(options): EdgeLayer

Defined in: packages/sigma/src/rendering/edges/layers/gradient.ts:94

Creates a gradient layer that interpolates between color stops along the edge, e.g. { stops: [{ node: "source" }, { node: "target" }] } for a gradient between the endpoint node colors.

Node colors are read from the node data texture, so they stay in sync with node styles (hover, state changes…) without any per-edge data. Colors carry only their own alpha; edge opacity dims the final fragment once.

Parameters

options

LayerGradientOptions

Gradient configuration

Returns

EdgeLayer

EdgeLayer definition for the gradient