Skip to content

Documentation / @ripl/charts / SegmentLabelLayout

Interface: SegmentLabelLayout

Defined in: charts/src/core/labels.ts:256

Fully resolved layout for a segment label: placement, content, styling, and leader-line points.

Properties

PropertyTypeDescriptionDefined in
connectorPoint[]Leader-line points; always ≥2 (a degenerate line at the anchor when hidden/inside).charts/src/core/labels.ts:274
contentstringText content, or '' when hidden.charts/src/core/labels.ts:260
fillstringColour of the label text.charts/src/core/labels.ts:270
font?stringCSS font shorthand for the label text (falls back to the shared segment-label font).charts/src/core/labels.ts:272
showConnectorbooleanWhether the leader line should be shown (visible outside labels only).charts/src/core/labels.ts:276
textAlignTextAlignment | undefinedHorizontal text alignment for the label.charts/src/core/labels.ts:266
textBaselineTextBaseline | undefinedVertical text baseline for the label.charts/src/core/labels.ts:268
visiblebooleanWhether the label should be shown (respects labels.visible and the min-angle guard).charts/src/core/labels.ts:258
xnumberLabel anchor x coordinate, in chart pixels.charts/src/core/labels.ts:262
ynumberLabel anchor y coordinate, in chart pixels.charts/src/core/labels.ts:264