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

CreateEdgeLabelProgramOptions

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

Options for creating an edge label program. Extends EdgeLabelOptions with program-specific options (paths, extremity ratios).

Extends

Properties

color?

optional color?: EdgeLabelColorSpecification

Defined in: packages/sigma/src/rendering/edges/types.ts:454

Label color configuration. Can specify either a fixed color or an attribute name. Default: uses settings.edgeLabelColor

Inherited from

EdgeLabelOptions.color


fontSizeMode?

optional fontSizeMode?: EdgeLabelFontSizeMode

Defined in: packages/sigma/src/rendering/edges/types.ts:489

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

EdgeLabelOptions.fontSizeMode


fullVisibilityThreshold?

optional fullVisibilityThreshold?: number

Defined in: packages/sigma/src/rendering/edges/types.ts:503

Visibility ratio at which labels reach full opacity (0-1). Between minVisibilityThreshold and this value, labels fade in gradually. Default: 0.6

Inherited from

EdgeLabelOptions.fullVisibilityThreshold


headLengthRatio?

optional headLengthRatio?: number

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

Head extremity length ratio (length / thickness). Default: 0 (no head extremity)


margin?

optional margin?: number

Defined in: packages/sigma/src/rendering/edges/types.ts:464

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

EdgeLabelOptions.margin


minVisibilityThreshold?

optional minVisibilityThreshold?: number

Defined in: packages/sigma/src/rendering/edges/types.ts:496

Minimum label visibility ratio to render (0-1). Labels with less visible content are hidden entirely. Default: 0.5

Inherited from

EdgeLabelOptions.minVisibilityThreshold


paths

paths: EdgePath[]

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

The path types for positioning labels along edges (supports multi-path). Must match the paths used by the corresponding edge program.


tailLengthRatio?

optional tailLengthRatio?: number

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

Tail extremity length ratio (length / thickness). Default: 0 (no tail extremity)


textBorder?

optional textBorder?: object

Defined in: packages/sigma/src/rendering/edges/types.ts:470

Text border (outline/stroke) configuration for improved readability. When specified, renders a border around each character using SDF techniques.

color

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

width: number

Border width in pixels

Inherited from

EdgeLabelOptions.textBorder