API / Series/General / StackLabelsOptions

Defined in: src/core/types/chart/series.ts:101

Raw totals of visible stacked series. Participants in one stack and value axis must
resolve to identical aggregation, style, format, padding and allowOverlap settings or validation fails.

Type Parameters

Type Parameter Default type
T MeaningfulAny

Properties

Property Type Description
aggregation? "sum" | (args) => number Calculate the label value without changing stack geometry or sign grouping. Return a finite number; NaN and infinite results hide the label. Returning zero does not itself hide it. Area totals include isolated real points, but no label is shown without an area boundary at that X. - 'sum': Sum raw values (x for bar-y, y for bar-x and area). Default 'sum'
allowOverlap? boolean Allow totals to overlap other labels. Otherwise overlapping totals are hidden. Segment labels in the same plugin layer take priority, even for small top segments. Default false
enabled? boolean Include the visible series in stack totals. Series-level values override plugin options. Default false
format? ValueFormat Format the aggregated value, including for percent stacks. Custom formatters receive {value}.
padding? number Distance from the stack boundary in pixels. Labels are kept inside the plot. Default 5
style? Partial<BaseTextStyle> Text styles, merged with plugin defaults.