Skip to content

Documentation / @ripl/charts / SegmentLabelSpec

Interface: SegmentLabelSpec

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

Describes a single segment label to render.

Properties

PropertyTypeDescriptionDefined in
contentstringThe label text.charts/src/core/labels.ts:119
fill?stringDefaults to the inside fill; pass the outside fill (or a custom colour) as needed.charts/src/core/labels.ts:127
font?stringDefaults to SEGMENT_LABEL_FONT.charts/src/core/labels.ts:125
id?stringOptional element id for the label.charts/src/core/labels.ts:113
opacity?numberInitial opacity (defaults to 0 so callers can fade the label in).charts/src/core/labels.ts:129
textAlign?TextAlignmentDefaults to the shared centered/middle alignment used for inside labels.charts/src/core/labels.ts:121
textBaseline?TextBaselineVertical text baseline; defaults to the shared middle alignment used for inside labels.charts/src/core/labels.ts:123
xnumberLabel x coordinate, in chart pixels.charts/src/core/labels.ts:115
ynumberLabel y coordinate, in chart pixels.charts/src/core/labels.ts:117
zIndex?numberStacking order relative to sibling elements (defaults to 1).charts/src/core/labels.ts:131