LabelOptions
Defined in: packages/sigma/src/rendering/nodes/types.ts:378
Options for configuring labels rendered by the LabelProgram.
Per-item label position is set via the style system (labelPosition style),
not here — the primitives scope only configures program-wide defaults that
styles can override.
Properties
color?
optionalcolor?:string
Defined in: packages/sigma/src/rendering/nodes/types.ts:394
Default label color (CSS color string). Default: “#000000”
font?
optionalfont?:LabelFontOptions
Defined in: packages/sigma/src/rendering/nodes/types.ts:388
Font configuration for labels.
margin?
optionalmargin?:number
Defined in: packages/sigma/src/rendering/nodes/types.ts:383
Default margin between node edge and label in pixels. Default: 5
zoomToLabelSizeRatioFunction?
optionalzoomToLabelSizeRatioFunction?: (ratio) =>number
Defined in: packages/sigma/src/rendering/nodes/types.ts:402
Function that maps camera zoom ratio to a label size ratio. The label size is divided by this value, so returning values < 1 makes labels bigger. Default: () => 1 (labels stay at fixed pixel size regardless of zoom). Example: Math.sqrt makes labels scale with zoom like nodes do.
Parameters
ratio
number
Returns
number