Interface: TooltipOptions<TType>
-
↳
TooltipOptions
• animation: AnimationSpec<TType
>
Defined in
index.esm.d.ts:2693 (opens new window)
animations
• animations: AnimationsSpec<TType
>
Defined in
index.esm.d.ts:2694 (opens new window)
axis
• axis: "x"
| "y"
| "xy"
Can be set to ‘x’, ‘y’, or ‘xy’ to define which directions are used in calculating distances. Defaults to ‘x’ for ‘index’ mode and ‘xy’ in dataset and ‘nearest’ modes.
Inherited from
.axis
Defined in
index.esm.d.ts:1396 (opens new window)
backgroundColor
• backgroundColor: Scriptable<, ScriptableTooltipContext<TType
>>
Background color of the tooltip.
default
‘rgba(0, 0, 0, 0.8)’
Defined in
index.esm.d.ts:2551 (opens new window)
bodyAlign
• bodyAlign: Scriptable<, ScriptableTooltipContext<TType
>>
Horizontal alignment of the body text lines.
default
‘left’
Defined in
index.esm.d.ts:2601 (opens new window)
bodyColor
• bodyColor: Scriptable<, ScriptableTooltipContext<TType
>>
Color of body
default
‘#fff’
Defined in
index.esm.d.ts:2591 (opens new window)
bodyFont
• bodyFont: Scriptable<, ScriptableTooltipContext<TType
>>
See Fonts.
default
{}
Defined in
index.esm.d.ts:2596 (opens new window)
bodySpacing
• bodySpacing: Scriptable<number
, <TType
>>
Spacing to add to top and bottom of each tooltip item.
default
2
Defined in
borderColor
• borderColor: <Color, <TType
>>
Color of the border.
default
‘rgba(0, 0, 0, 0)’
Defined in
borderWidth
• borderWidth: <number
, ScriptableTooltipContext<TType
>>
Size of the border.
default
0
Defined in
index.esm.d.ts:2681 (opens new window)
boxHeight
• boxHeight: Scriptable<number
, <TType
>>
Height of the color box if displayColors is true.
default
bodyFont.size
Defined in
boxPadding
• boxPadding: number
Padding between the color box and the text.
default
1
Defined in
index.esm.d.ts:2556 (opens new window)
boxWidth
• boxWidth: Scriptable<number
, <TType
>>
Width of the color box if displayColors is true.
default
bodyFont.size
Defined in
callbacks
• callbacks: <TType
, TooltipModel<TType
>, <TType
>>
Defined in
• caretPadding: Scriptable<number
, <TType
>>
default
2
Defined in
caretSize
• caretSize: <number
, ScriptableTooltipContext<TType
>>
Size, in px, of the tooltip arrow.
default
5
Defined in
index.esm.d.ts:2641 (opens new window)
cornerRadius
• cornerRadius: Scriptable<number
| , ScriptableTooltipContext<TType
>>
Radius of tooltip corner curves.
default
6
Defined in
index.esm.d.ts:2646 (opens new window)
displayColors
• displayColors: Scriptable<, <TType
>>
If true, color boxes are shown in the tooltip.
default
true
Defined in
enabled
• enabled: <boolean
, ScriptableTooltipContext<TType
>>
Are on-canvas tooltips enabled?
default
true
Defined in
index.esm.d.ts:2524 (opens new window)
footerAlign
• footerAlign: Scriptable<, ScriptableTooltipContext<TType
>>
Horizontal alignment of the footer text lines.
default
‘left’
Defined in
index.esm.d.ts:2626 (opens new window)
footerColor
• footerColor: Scriptable<, ScriptableTooltipContext<TType
>>
Color of footer
default
‘#fff’
Defined in
index.esm.d.ts:2616 (opens new window)
footerFont
• footerFont: Scriptable<, ScriptableTooltipContext<TType
>>
See Fonts
default
{weight: ‘bold’}
Defined in
index.esm.d.ts:2621 (opens new window)
footerMarginTop
• footerMarginTop: Scriptable<number
, <TType
>>
Margin to add before drawing the footer.
default
6
Defined in
footerSpacing
• footerSpacing: <number
, ScriptableTooltipContext<TType
>>
Spacing to add to top and bottom of each footer line.
default
2
Defined in
index.esm.d.ts:2606 (opens new window)
intersect
• intersect: boolean
if true, the hover mode only applies when the mouse position intersects an item on the chart.
default
true
Inherited from
Defined in
index.esm.d.ts:1391 (opens new window)
mode
• mode: keyof InteractionModeMap
Sets which elements appear in the tooltip. See Interaction Modes for details.
default
‘nearest’
Inherited from
Defined in
multiKeyBackground
• multiKeyBackground: <Color, <TType
>>
Color to draw behind the colored boxes when multiple items are in the tooltip.
default
‘#fff’
Defined in
padding
Padding to add to the tooltip
default
6
Defined in
index.esm.d.ts:2631 (opens new window)
• position: <"nearest"
| "average"
, ScriptableTooltipContext<TType
>>
The mode for positioning the tooltip
Defined in
index.esm.d.ts:2532 (opens new window)
rtl
• rtl: Scriptable<boolean
, <TType
>>
true for rendering the legends from right to left.
Defined in
textDirection
• textDirection: <string
, ScriptableTooltipContext<TType
>>
This will force the text direction ‘rtl’ or ‘ltr on the canvas for rendering the tooltips, regardless of the css specified on the canvas
default
canvas’s default
Defined in
index.esm.d.ts:2691 (opens new window)
titleAlign
• titleAlign: Scriptable<, ScriptableTooltipContext<TType
>>
Horizontal alignment of the title text lines.
default
‘left’
Defined in
index.esm.d.ts:2581 (opens new window)
titleColor
• titleColor: Scriptable<, ScriptableTooltipContext<TType
>>
Color of title
default
‘#fff’
Defined in
index.esm.d.ts:2561 (opens new window)
titleFont
• titleFont: Scriptable<, ScriptableTooltipContext<TType
>>
See Fonts
default
{weight: ‘bold’}
Defined in
index.esm.d.ts:2566 (opens new window)
titleMarginBottom
• titleMarginBottom: Scriptable<number
, <TType
>>
Margin to add on bottom of title section.
default
6
Defined in
titleSpacing
• titleSpacing: <, ScriptableTooltipContext<TType
>>
Spacing to add to top and bottom of each title line.
default
2
Defined in
index.esm.d.ts:2571 (opens new window)
usePointStyle
• usePointStyle: Scriptable<boolean
, <TType
>>
Use the corresponding point style (from dataset options) instead of color boxes, ex: star, triangle etc. (size is based on the minimum value between boxWidth and boxHeight)
default
false
Defined in
xAlign
• xAlign: <TooltipXAlignment, <TType
>>
Override the tooltip alignment calculations
Defined in
yAlign
• yAlign: <TooltipYAlignment, <TType
>>
Defined in
external
▸ external(args
): void
See external tooltip section.
Parameters
Returns
void
Defined in
index.esm.d.ts:2528 (opens new window)
filter
▸ filter(e
, index
, array
, data
): boolean
Parameters
Returns
boolean
Defined in
itemSort
▸ itemSort(a
, b
, data
): number
Sort tooltip items.
Parameters
Returns
number