API reference: @salmonui/charts/chart
ChartTooltipOptionsinterface
import type { ChartTooltipOptions } from '@salmonui/charts/chart';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;
}
| Name | Signature | Description |
|---|---|---|
modeoptional | readonly mode?: 'point' | 'shared' | 'split' | undefined; |
|
positionoptional | readonly position?: 'nearest' | 'pointer' | {
readonly x: number;
readonly y: number;
} | undefined; |
|
offsetoptional | readonly offset?: number | undefined; | Gap between the anchor and the box, px (default 10). |
formatoptional | readonly format?: ((ctx: ChartPointContext) => string) | undefined; | |
headeroptional | readonly header?: string | ((ctx: ChartTooltipContext) => string) | undefined; | |
renderoptional | readonly render?: ((ctx: ChartTooltipContext) => ReactNode) | undefined; |