Skip to content

grafit-charts


Interface: TooltipOptions ​

Extends ​

Properties ​

background? ​

optional background?: string

Container background (theme background by default).


borderColor? ​

optional borderColor?: string

Border color (theme muted color by default).


borderRadius? ​

optional borderRadius?: number


borderWidth? ​

optional borderWidth?: number

Border width; 0 removes the border.


color? ​

optional color?: string

Inherited from ​

FontOptions.color


container? ​

optional container?: HTMLElement | "body" | "chart"

Where the tooltip element lives. 'chart' (by default) — inside the chart container, positioned in its coordinates and kept within its bounds. 'body' — in document.body with position: fixed, kept within the viewport, so ancestors with overflow: hidden don't clip it. An element — appended there and positioned like 'body' (an app's own overlay layer).


enabled? ​

optional enabled?: boolean

Inherited from ​

Switchable.enabled


fontFamily? ​

optional fontFamily?: string

Inherited from ​

FontOptions.fontFamily


fontSize? ​

optional fontSize?: number

Inherited from ​

FontOptions.fontSize


fontStyle? ​

optional fontStyle?: FontStyle

Inherited from ​

FontOptions.fontStyle


fontWeight? ​

optional fontWeight?: FontWeight

Inherited from ​

FontOptions.fontWeight


mode? ​

optional mode?: "single" | "shared"

single — the nearest node; shared — values of all series in the category.


padding? ​

optional padding?: string | PaddingValue

Inner padding of the container: 8, [8, 12], [8, 12, 4, 0], { top, right, bottom, left } — or a raw CSS string.


position? ​

optional position?: object

Positioning: at the node edge (by default), at the node center, or at the pointer.

anchorTo? ​

optional anchorTo?: "center" | "node" | "pointer"

xOffset? ​

optional xOffset?: number

yOffset? ​

optional yOffset?: number


range? ​

optional range?: number | "exact" | "nearest"

Capture area: a number — radius in px (30), 'exact' — only direct hits on a node, 'nearest' — the nearest node from anywhere in the plot area.


shadow? ​

optional shadow?: string | false

CSS box-shadow; false removes the shadow.


zIndex? ​

optional zIndex?: number

CSS z-index of the tooltip element: 10 inside the chart, 1000 outside it.