---
id: "packages/active-charts/all-exports/data-label-options"
title: "Data label options"
description: "DataLabelOptions, NightingaleConnectorOptions, NightingaleDataLabelOptions, FunnelDataLabelOptions and 3 more: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/data-label-options"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:data-label-options"
---

# Data label options

Exported by `@workspace/active-charts`. Generated from the package source; part of [the index of every export](/packages/active-charts/all-exports).

## Types

**DataLabelOptions**

```ts
interface DataLabelOptions {
  enabled?: boolean;
  formatter?: (value: number) => string;
  format?: string;
  percentage?: boolean;
  fontSize?: number;
  color?: string;
  background?: LabelBackgroundOptions;
}
```

Unified data label configuration for standalone chart types.

Used by PieChart, NightingaleChart, RadialBarChart, FunnelChart,
GaugeChart, and LinearGauge. Cartesian charts continue to use
`LabelOptions` on their series configuration.

Accepts `boolean` shorthand: `dataLabels={true}` is equivalent to
`dataLabels={{ enabled: true }}` with chart-type-specific defaults.

**NightingaleConnectorOptions**

```ts
interface NightingaleConnectorOptions {
  enabled?: boolean;
  color?: string;
  width?: number;
  opacity?: number;
}
```

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.

**NightingaleDataLabelOptions**

```ts
interface NightingaleDataLabelOptions extends DataLabelOptions {
  connector?: boolean | 'auto' | NightingaleConnectorOptions;
  offset?: number;
  nameFontWeight?: number | string;
  valueFontWeight?: number | string;
}
```

Data label configuration specific to the nightingale/rose chart. Extends the
shared {@link DataLabelOptions} with connector, offset and per-line typography
controls. Accepts `DataLabelOptions | boolean` — the nightingale-specific
fields are ignored when omitted.

**FunnelDataLabelOptions**

```ts
interface FunnelDataLabelOptions extends Omit<
  DataLabelOptions,
  'fontSize' | 'color' | 'formatter'
> {
  formatter?: (value: number, context?: FunnelLabelFormatterContext) => string;
}
```

The stage labels of a funnel (T9): {@link DataLabelOptions} without the
family-owned `fontSize` and `color`, and a formatter that also receives
the stage's {@link FunnelLabelFormatterContext}. 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.valueFormatter`, and CSV the raw number.

**HeatmapLabelOptions**

```ts
interface HeatmapLabelOptions {
  enabled?: boolean;
  formatter?: (value: number) => string;
  format?: string;
  color?: string | 'auto';
  background?: LabelBackgroundOptions;
}
```

The value labels of a heatmap's cells (`HeatmapChartProps.label`): off by
default; a label that does not fit its cell is left out, its value stays
in the tooltip and the table.

**PieCalloutLabelOptions**

```ts
interface PieCalloutLabelOptions extends DataLabelOptions {
  name?: boolean;
  value?: boolean;
  minAngle?: number;
}
```

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
{@link DataLabelOptions}; each content field switches one part, and a
slice whose callout would be empty gets none.

**PieSectorLabelOptions**

```ts
interface PieSectorLabelOptions {
  enabled?: boolean;
  percentage?: boolean;
  value?: boolean;
  name?: boolean;
  formatter?: (value: number) => string;
  format?: string;
  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.
