EdgeLabelOptions
Defined in: packages/sigma/src/rendering/edges/types.ts:449
Options for edge label styling. Used both in EdgeProgramOptions.label and CreateEdgeLabelProgramOptions.
Note: Property names here (color, position, margin, fontSizeMode) are shorter than the corresponding settings (edgeLabelColor, edgeLabelPosition, etc.) since these are already in an edge label context.
Extended by
Properties
color?
optionalcolor?: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
fontSizeMode?
optionalfontSizeMode?: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
fullVisibilityThreshold?
optionalfullVisibilityThreshold?: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
margin?
optionalmargin?: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.
minVisibilityThreshold?
optionalminVisibilityThreshold?: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
textBorder?
optionaltextBorder?: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