# ChartTooltipOptions (@salmonui/charts/chart)

> The ChartTooltipOptions interface of @salmonui/charts/chart.

Canonical: https://salmonui.dev/docs/reference/charts/chart/ChartTooltipOptions

```ts
import type { ChartTooltipOptions } from '@salmonui/charts/chart';
```

Entry index: https://salmonui.dev/docs/reference/charts/chart (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/chart.md).

## Reference

Kind: interface

```ts
interface ChartTooltipOptions {
    readonly mode?: 'point' | 'shared' | 'split' | undefined;
    readonly position?: 'nearest' | 'pointer' | {
        readonly x: number;
        readonly y: number;
    } | undefined;
    readonly offset?: number | undefined;
    readonly format?: ((ctx: ChartPointContext) => string) | undefined;
    readonly header?: string | ((ctx: ChartTooltipContext) => string) | undefined;
    readonly render?: ((ctx: ChartTooltipContext) => ReactNode) | undefined;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `mode` | `readonly mode?: 'point' \| 'shared' \| 'split' \| undefined;` | optional | `'shared'`: one box for every series at the x; `'split'`: one box per series at its own point. |
| `position` | `readonly position?: 'nearest' \| 'pointer' \| {     readonly x: number;     readonly y: number; } \| undefined;` | optional | `'nearest'` (default): above the nearest point; `'pointer'`: follows the pointer; `{ x, y }`: fixed drawing px. |
| `offset` | `readonly offset?: number \| undefined;` | optional | Gap between the anchor and the box, px (default 10). |
| `format` | `readonly format?: ((ctx: ChartPointContext) => string) \| undefined;` | optional |  |
| `header` | `readonly header?: string \| ((ctx: ChartTooltipContext) => string) \| undefined;` | optional |  |
| `render` | `readonly render?: ((ctx: ChartTooltipContext) => ReactNode) \| undefined;` | optional |  |
