TooltipSpec
@elastic/charts • Exports
@elastic/charts / TooltipSpec
Interface: TooltipSpec<D, SI>
Spec used to configure tooltip for chart
Contents
- Extends
- Type parameters
- Properties
- actionPrompt
- actions
- actionsLoading
- body
- boundary?
- boundaryPadding?
- chartType
- customTooltip?
- fallbackPlacements?
- footer
- header
- headerFormatter?
- id
- maxTooltipItems
- maxVisibleTooltipItems
- noActionsLoaded
- offset?
- pinningPrompt
- placement?
- selectionPrompt
- showNullValues
- snap
- sort?
- specType
- stickTo?
- type
- unit?
Extends
Spec
.TooltipPortalSettings
<"chart"
>
Type parameters
• SI extends SeriesIdentifier
= SeriesIdentifier
Properties
actionPrompt
actionPrompt:
string
Prompt displayed to indicate user can right-click for contextual menu
Source
packages/charts/src/specs/tooltip.ts:213
actions
actions:
TooltipAction
<D
,SI
>[] | (selected
) =>TooltipAction
<D
,SI
>[] |Promise
<TooltipAction
<D
,SI
>[]>
Actions to enable tooltip selection
Source
packages/charts/src/specs/tooltip.ts:196
actionsLoading
actionsLoading:
string
|ComponentType
<Object
>
Shown in place of actions UI while loading async actions
Source
packages/charts/src/specs/tooltip.ts:203
body
body:
"none"
|"default"
|ComponentType
<Object
>
Custom body for tooltip. Ignored when used with customTooltip
.
Note: This is not the table body but spans the entire tooltip.
Source
packages/charts/src/specs/tooltip.ts:186
boundary?
boundary?:
HTMLElement
|"chart"
Boundary element to contain tooltip within
'chart'
will use the chart container as the boundary
Default Value
parent scroll container
Inherited from
TooltipPortalSettings.boundary
Source
packages/charts/src/components/portal/types.ts:112
boundaryPadding?
boundaryPadding?:
number
|Partial
<PerSideDistance
>
Boundary element padding. Used to reduce extents of boundary placement when margins or paddings are used on boundary
Default Value
0
Inherited from
TooltipPortalSettings.boundaryPadding
Source
packages/charts/src/components/portal/types.ts:119
chartType
chartType:
ChartType
Chart type define the type of chart that use this spec
Inherited from
Source
packages/charts/src/specs/spec_type.ts:31
customTooltip?
customTooltip?:
CustomTooltip
<D
,SI
>
Render custom tooltip given header and values
Source
packages/charts/src/specs/tooltip.ts:162
fallbackPlacements?
fallbackPlacements?:
Placement
[]
If given tooltip placement is not suitable, these Placement
s will
be used as fallback placements.
Inherited from
TooltipPortalSettings.fallbackPlacements
Source
packages/charts/src/components/portal/types.ts:104
footer
footer:
"none"
|"default"
|ComponentType
<Object
>
Custom footer for tooltip. Ignored when used with customTooltip
.
Note: This is not the table footers but spans the entire tooltip.
Source
packages/charts/src/specs/tooltip.ts:191
header
header:
"none"
|"default"
|ComponentType
<Object
>
Custom header for tooltip. Ignored when used with customTooltip
.
Note: This is not the table headers but spans the entire tooltip.
Source
packages/charts/src/specs/tooltip.ts:180
headerFormatter?
headerFormatter?:
TooltipHeaderFormatter
<D
>
A TooltipHeaderFormatter to format the header value. Ignored when header is defined.
Source
packages/charts/src/specs/tooltip.ts:149
id
id:
string
unique Spec identifier