Documentation / @ripl/charts / SegmentLabelLayout
Interface: SegmentLabelLayout ​
Defined in: charts/src/core/labels.ts:268
Fully resolved layout for a segment label: placement, content, styling, and leader-line points.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
connector | Point[] | Leader-line points; always ≥2 (a degenerate line at the anchor when hidden/inside). | charts/src/core/labels.ts:286 |
content | string | Text content, or '' when hidden. | charts/src/core/labels.ts:272 |
fill | string | Color of the label text. | charts/src/core/labels.ts:282 |
font? | string | CSS font shorthand for the label text (falls back to the shared segment-label font). | charts/src/core/labels.ts:284 |
showConnector | boolean | Whether the leader line should be shown (visible outside labels only). | charts/src/core/labels.ts:288 |
textAlign | TextAlignment | undefined | Horizontal text alignment for the label. | charts/src/core/labels.ts:278 |
textBaseline | TextBaseline | undefined | Vertical text baseline for the label. | charts/src/core/labels.ts:280 |
visible | boolean | Whether the label should be shown (respects labels.visible and the min-angle guard). | charts/src/core/labels.ts:270 |
x | number | Label anchor x coordinate, in chart pixels. | charts/src/core/labels.ts:274 |
y | number | Label anchor y coordinate, in chart pixels. | charts/src/core/labels.ts:276 |