---
id: "packages/active-charts/all-exports/tooltip-options"
title: "Tooltip options"
description: "ChartTooltipContext, TooltipOptions, TooltipRendererParams, TooltipStyleOptions: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/tooltip-options"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:tooltip-options"
---

# Tooltip options

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

## Types

**ChartTooltipContext**

```ts
interface ChartTooltipContext {
  readonly xAxisType: AxisType;
  readonly xTemporalSemantic?: TemporalSemantic;
  readonly yAxisType: AxisType;
  readonly valueFormatter?: (
    value: number,
    params?: TooltipRendererParams,
  ) => string;
  readonly valueSemantics?: ChartValueSemantics;
}
```

What a tooltip knows about the axes it points into: the x axis's type and
temporal semantic, the y axis's type, the host's `valueFormatter` and the
series' value semantics, so a custom renderer formats a value exactly as
the axis beneath it does. Built from the chart's geometry (one axis truth,
no second derivation) and passed as `TooltipData.context` and
`TooltipRendererParams.context`; absent on the standalone families, which
have no Cartesian axes. Kept narrow: only fields with a consumer.

**TooltipOptions**

```ts
interface TooltipOptions {
  enabled?: boolean;
  mode?: 'single' | 'shared' | 'split';
  renderer?: (params: TooltipRendererParams) => ReactNode;
  valueFormatter?: (value: number, params?: TooltipRendererParams) => string;
  snapDistance?: number;
  pin?: boolean;
  style?: TooltipStyleOptions;
}
```

**TooltipRendererParams**

```ts
interface TooltipRendererParams {
  point: {
    datum: Record<string, unknown>;
    xKey: string;
    yKey: string;
    xValue: Date | number | string;
    yValue: number;
    seriesName: string;
    color: string;
    sizeValue?: number;
    sizeKey?: string;
    errorBounds?: TooltipErrorBounds;
    xErrorBounds?: TooltipErrorBounds;
    zone?: string;
  };
  context?: ChartTooltipContext;
  entries?: Array<{
    seriesName: string;
    color: string;
    yKey: string;
    yValue: number | null;
    errorBounds?: TooltipErrorBounds;
    zone?: string;
  }>;
  groupMeta?: GroupMeta;
}
```

Context object for tooltip-renderer callbacks, in three groups:

- `point` — per-datum + per-series info (datum, x/yKey, x/yValue, seriesName, color, scatter size)
- `context` — tooltip context (axis info, formatter defaults) from the chart geometry
- mode-specific data (`entries` for shared mode) and pipeline context (`groupMeta`)

**TooltipStyleOptions**

```ts
interface TooltipStyleOptions {
  background?: string;
  borderColor?: string;
  borderRadius?: number;
  boxShadow?: string;
  fontSize?: number;
  fontFamily?: string;
  padding?: Padding;
  color?: string;
}
```

Visual styling overrides for the tooltip surface. Each field falls back
to the active theme value (`ACTIVE_CHARTS_THEME.tooltip.*`) when omitted.
