Marker options
LabelBackgroundOptions, FunnelLabelFormatterContext, LabelFormatterContext, LabelOptions and 2 more: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Types#
Background/callout configuration for data labels.
When configured, a <rect> is rendered behind the label text with the given fill, stroke, border-radius, and padding. Defaults are conservative — an empty object {} produces no visible background (transparent fill, 0 stroke).
Applied by bar, line, scatter, histogram, waterfall, range-bar (via Label) and pie, funnel, nightingale, radial-bar, gauge, linear-gauge (via Data).
interface LabelBackgroundOptions {
fill?: string;
stroke?: string;
strokeWidth?: number;
borderRadius?: number;
padding?: number | {x?: number; y?: number};
}What a funnel stage label's formatter knows besides the number (T9): the Label of the stage (series 'funnel', series the chart's name) and its place in the funnel. The shares are raw fractions over the VISIBLE stages, the stages the reader sees: a stage hidden in the legend is no stage's first or previous. A share whose value or denominator is not a finite number, or whose denominator is not above zero, is absent, never 0 or a guess.
interface FunnelLabelFormatterContext extends LabelFormatterContext {
readonly index: number;
readonly shareOfFirst?: number;
readonly shareOfPrevious?: number;
}What a data-label formatter knows besides the number (CF1): the row the label belongs to and the series that draws it, so two rows with the same value can carry different text. Passed by bar, waterfall, line and scatter labels; a histogram bin has no source row, so its formatter receives the number only.
interface LabelFormatterContext {
readonly datum: ChartDatum;
readonly seriesId: string;
readonly seriesName: string;
readonly role?: 'low' | 'high';
readonly stepKind?: WaterfallStepKind;
}interface LabelOptions {
enabled?: boolean;
formatter?: (value: number, context?: LabelFormatterContext) => string;
format?: string;
position?: 'inside' | 'outside';
fallback?: 'auto' | 'hide';
fontSize?: number;
color?: string;
offset?: number;
background?: LabelBackgroundOptions;
}The vertex markers of a line or area series: a mark at each defined point. A scatter or bubble series reads only Marker and Marker (its point is the mark, painted by the series' own fill and stroke).
interface MarkerOptions {
enabled?: boolean;
size?: number;
shape?: MarkerShape;
fill?: string;
stroke?: string;
visible?: 'always' | 'hover' | 'never';
paint?: DatumPaintResolver<DatumPaint>;
}The bounded vocabulary of point-marker shapes: enough non-colour identity for point series, not a symbol catalogue. Every shape has the area of the circle of the same size, so no series weighs more than another; no paths, images or custom renderers. A shape is visual redundancy for the series' colour, never data: the tooltip, the data table and the announcement do not name it.
type MarkerShape =
'circle' | 'square' | 'diamond' | 'triangle' | 'triangle-down';