Interface: TextLabel
Experimental
One label. Position is in DATA space (see DataTransform); JS numbers are float64.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
align? | "center" | "left" | "right" | Experimental Alignment of lines within a multi-line block. Default: follows anchorX. | TextStyle.align |
anchorX? | TextAnchorX | Experimental Default left. | TextStyle.anchorX |
anchorY? | TextAnchorY | Experimental Default baseline. | TextStyle.anchorY |
angle? | number | Experimental Rotation in degrees, Plotly textangle / tickangle convention: clockwise positive on screen, about the anchor point. Default 0. | TextStyle.angle |
color? | RGBA | Experimental sRGB 0–1 RGBA, straight alpha. Default opaque black. | TextStyle.color |
font? | Partial<TextFont> | Experimental Merged field-by-field: { ...defaults, ...style.font, ...label.font }. | TextStyle.font |
lineHeight? | number | Experimental Line advance as a multiple of the font size. Default TEXT_DEFAULT_LINE_HEIGHT. | TextStyle.lineHeight |
maxWidth? | number | Experimental Max line width in px (font units). Default: unlimited. | TextStyle.maxWidth |
offset? | readonly [number, number] | Experimental Screen-space offset from the anchor in px, [dx, dy] with +y down. Not rotated by angle. | TextStyle.offset |
outline? | TextOutline | null | Experimental Outline/halo/shadow; null disables an outline inherited from the shared style. An outline takes precedence over font.shadow, which otherwise becomes the outline pass (a CSS shadow is an outline of width 0 with blur and offset). | TextStyle.outline |
overflow? | TextOverflow | Experimental Default wrap. Only used when maxWidth is finite. | TextStyle.overflow |
runs? | TextRunLines | Experimental Rich text (E2.10): lines of styled runs, drawn instead of text as one batch member per run (see text-runs.ts). Leave unset for plain text, which is drawn as one member (the fast path). Rich labels do not wrap or ellipsize (maxWidth is ignored), like Plotly's SVG text. | - |
text | string | Experimental The text, or its plain-text equivalent when TextLabel.runs is set. | - |
x | number | Experimental | - |
y | number | Experimental | - |
z? | number | Experimental Default 0. | - |