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

LayerGradientOptions

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

Options for the gradient layer.

Properties

enabled?

optional enabled?: object

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

Per-edge toggle, read from a boolean edge attribute. Edges whose attribute resolves to false skip the gradient and fall through to the layers below (same pattern as disabling dashes with dashSize: 0).

Default: gradient on for every edge.

attribute

attribute: string

default?

optional default?: boolean


stops

stops: GradientStop[]

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

Color stops, from the source end to the target end. Each stop is an EdgeColorValue form (e.g. { node: "source" }, "transparent", { attribute: "color" }) with an optional offset field.

Offsets follow CSS gradient rules: the first stop defaults to 0, the last to 1, offsets are clamped to [0, 1] and forced non-decreasing, and stops without an offset spread evenly between their positioned neighbors. Before the first offset and past the last one, the gradient pads with the nearest stop’s color.