CreateEdgeLabelProgramOptions
Defined in: packages/sigma/src/rendering/edges/labels/factory.ts:73
Options for creating an edge label program. Extends EdgeLabelOptions with program-specific options (paths, extremity ratios).
Extends
Section titled “Extends”Properties
Section titled “Properties”color?
Section titled “color?”
optionalcolor?:EdgeLabelColorSpecification
Defined in: packages/sigma/src/rendering/edges/types.ts:470
Label color configuration. Can specify either a fixed color or an attribute name. Default: uses settings.edgeLabelColor
Inherited from
Section titled “Inherited from”fontSizeMode?
Section titled “fontSizeMode?”
optionalfontSizeMode?:EdgeLabelFontSizeMode
Defined in: packages/sigma/src/rendering/edges/types.ts:505
Font size mode for edge labels.
- “fixed”: Constant pixel size regardless of zoom (default)
- “scaled”: Scales with zoom level using zoomToSizeRatioFunction from settings Default: uses settings.edgeLabelFontSizeMode
Inherited from
Section titled “Inherited from”fullVisibilityThreshold?
Section titled “fullVisibilityThreshold?”
optionalfullVisibilityThreshold?:number
Defined in: packages/sigma/src/rendering/edges/types.ts:519
Visibility ratio at which labels reach full opacity (0-1). Between minVisibilityThreshold and this value, labels fade in gradually. Default: 0.6
Inherited from
Section titled “Inherited from”EdgeLabelOptions.fullVisibilityThreshold
headLengthRatio?
Section titled “headLengthRatio?”
optionalheadLengthRatio?:number
Defined in: packages/sigma/src/rendering/edges/labels/factory.ts:84
Head extremity length ratio (length / thickness). Default: 0 (no head extremity)
keepUpright?
Section titled “keepUpright?”
optionalkeepUpright?:boolean
Defined in: packages/sigma/src/rendering/edges/types.ts:527
Keeps labels readable: labels whose edge points leftward on screen are reversed so they never render upside down. The edge direction is kept. Labels flip as soon as their edge crosses vertical on screen. Default: true
Inherited from
Section titled “Inherited from”margin?
Section titled “margin?”
optionalmargin?:number
Defined in: packages/sigma/src/rendering/edges/types.ts:480
Margin between the edge surface and the label (in pixels) for “above”/“below”/“auto” modes. Default: uses settings.edgeLabelMargin
Note: per-edge position is set via the style system (labelPosition
style), not here — styles are the single source of truth so the text
and its background/picking hitbox can’t disagree.
Inherited from
Section titled “Inherited from”minVisibilityThreshold?
Section titled “minVisibilityThreshold?”
optionalminVisibilityThreshold?:number
Defined in: packages/sigma/src/rendering/edges/types.ts:512
Minimum label visibility ratio to render (0-1). Labels with less visible content are hidden entirely. Default: 0.5
Inherited from
Section titled “Inherited from”EdgeLabelOptions.minVisibilityThreshold
paths:
EdgePath[]
Defined in: packages/sigma/src/rendering/edges/labels/factory.ts:78
The path types for positioning labels along edges (supports multi-path). Must match the paths used by the corresponding edge program.
tailLengthRatio?
Section titled “tailLengthRatio?”
optionaltailLengthRatio?:number
Defined in: packages/sigma/src/rendering/edges/labels/factory.ts:90
Tail extremity length ratio (length / thickness). Default: 0 (no tail extremity)
textBorder?
Section titled “textBorder?”
optionaltextBorder?:object
Defined in: packages/sigma/src/rendering/edges/types.ts:486
Text border (outline/stroke) configuration for improved readability. When specified, renders a border around each character using SDF techniques.
color:
EdgeLabelColorSpecification
Border color - fixed color string or attribute-based. Examples:
"#ffffff"- Fixed white color{ attribute: "borderColor" }- Read from edge attribute{ attribute: "borderColor", defaultColor: "#fff" }- Attribute with fallback
width:
number
Border width in pixels