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

createEdgeLabelProgram

createEdgeLabelProgram<N, E, G>(options): EdgeLabelProgramType<N, E, G>

Defined in: packages/sigma/src/rendering/edges/labels/factory.ts:119

Creates an edge label program for a specific path type.

The resulting program renders text labels along edge paths using SDF (Signed Distance Field) atlas for crisp text at any zoom level.

Type Parameters

N

N extends Attributes = Attributes

E

E extends Attributes = Attributes

G

G extends Attributes = Attributes

Parameters

options

CreateEdgeLabelProgramOptions

Configuration for the edge label program

Returns

EdgeLabelProgramType<N, E, G>

An EdgeLabelProgram class constructor

Example

const LineEdgeLabelProgram = createEdgeLabelProgram({
paths: [pathLine(), pathCurved()],
});
// Attach to edge program
ComposedEdgeLineProgram.LabelProgram = LineEdgeLabelProgram;