Data label options
DataLabelOptions, NightingaleConnectorOptions, NightingaleDataLabelOptions, FunnelDataLabelOptions and 3 more: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Types#
Unified data label configuration for standalone chart types.
Used by PieChart, NightingaleChart, RadialBarChart, FunnelChart, GaugeChart, and LinearGauge. Cartesian charts continue to use Label on their series configuration.
Accepts boolean shorthand: data is equivalent to data with chart-type-specific defaults.
interface DataLabelOptions {
enabled?: boolean;
formatter?: (value: number) => string;
format?: string;
percentage?: boolean;
fontSize?: number;
color?: string;
background?: LabelBackgroundOptions;
}Connector-line configuration for nightingale data labels.
'auto' shows a connector when the radial gap between the segment's outer tip and the label anchor exceeds a visual-stub threshold (~8px). This keeps connectors off near-full-radius bars (where a short stub would look noisy) while still visually coupling shorter bars to their labels.
interface NightingaleConnectorOptions {
enabled?: boolean;
color?: string;
width?: number;
opacity?: number;
}Data label configuration specific to the nightingale/rose chart. Extends the shared Data with connector, offset and per-line typography controls. Accepts Data — the nightingale-specific fields are ignored when omitted.
interface NightingaleDataLabelOptions extends DataLabelOptions {
connector?: boolean | 'auto' | NightingaleConnectorOptions;
offset?: number;
nameFontWeight?: number | string;
valueFontWeight?: number | string;
}The stage labels of a funnel (T9): Data without the family-owned font and color, and a formatter that also receives the stage's Funnel. A one-argument formatter works unchanged. Its text is the stage's value text everywhere: the label, the data table and the announcement; the tooltip keeps tooltip., and CSV the raw number.
interface FunnelDataLabelOptions extends Omit<
DataLabelOptions,
'fontSize' | 'color' | 'formatter'
> {
formatter?: (value: number, context?: FunnelLabelFormatterContext) => string;
}The value labels of a heatmap's cells (Heatmap): off by default; a label that does not fit its cell is left out, its value stays in the tooltip and the table.
interface HeatmapLabelOptions {
enabled?: boolean;
formatter?: (value: number) => string;
format?: string;
color?: string | 'auto';
background?: LabelBackgroundOptions;
}The callout labels of a pie or donut (CF1): outside the pie, in two lines (name, then value), with a leader to their slice. Extends Data; each content field switches one part, and a slice whose callout would be empty gets none.
interface PieCalloutLabelOptions extends DataLabelOptions {
name?: boolean;
value?: boolean;
minAngle?: number;
}The sector labels of a pie or donut (CF1): one line INSIDE each slice, at its centroid (the middle of the ring on a donut), in the chart's one label colour. A sector label shows only where it fits inside its slice and reads at 4.5:1 on the slice's colour, at rest and while the slice steps back; otherwise it is hidden. It never moves outside: that is the callout's place. Accepts boolean shorthand.
interface PieSectorLabelOptions {
enabled?: boolean;
percentage?: boolean;
value?: boolean;
name?: boolean;
formatter?: (value: number) => string;
format?: string;
minAngle?: number;
}