Skip to content

Documentation / @ripl/charts / SegmentLabelSpec

Interface: SegmentLabelSpec ​

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

Describes a single segment label to render.

Properties ​

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