---
id: "packages/active-charts/all-exports/marker-options"
title: "Marker options"
description: "LabelBackgroundOptions, FunnelLabelFormatterContext, LabelFormatterContext, LabelOptions and 2 more: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/marker-options"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:marker-options"
---

# Marker options

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

## Types

**LabelBackgroundOptions**

```ts
interface LabelBackgroundOptions {
  fill?: string;
  stroke?: string;
  strokeWidth?: number;
  borderRadius?: number;
  padding?: number | {x?: number; y?: number};
}
```

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
{@link LabelOptions.background}) and pie, funnel, nightingale, radial-bar,
gauge, linear-gauge (via `DataLabelOptions.background`).

**FunnelLabelFormatterContext**

```ts
interface FunnelLabelFormatterContext extends LabelFormatterContext {
  readonly index: number;
  readonly shareOfFirst?: number;
  readonly shareOfPrevious?: number;
}
```

What a funnel stage label's formatter knows besides the number (T9): the
{@link LabelFormatterContext} of the stage (`seriesId` `'funnel'`,
`seriesName` 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.

**LabelFormatterContext**

```ts
interface LabelFormatterContext {
  readonly datum: ChartDatum;
  readonly seriesId: string;
  readonly seriesName: string;
  readonly role?: 'low' | 'high';
  readonly stepKind?: WaterfallStepKind;
}
```

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.

**LabelOptions**

```ts
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;
}
```

**MarkerOptions**

```ts
interface MarkerOptions {
  enabled?: boolean;
  size?: number;
  shape?: MarkerShape;
  fill?: string;
  stroke?: string;
  visible?: 'always' | 'hover' | 'never';
  paint?: DatumPaintResolver<DatumPaint>;
}
```

The vertex markers of a line or area series: a mark at each defined
point. A scatter or bubble series reads only {@link MarkerOptions.size}
and {@link MarkerOptions.shape} (its point is the mark, painted by the
series' own `fill` and `stroke`).

**MarkerShape**

```ts
type MarkerShape =
  'circle' | 'square' | 'diamond' | 'triangle' | 'triangle-down';
```

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.
