Skip to main content

TooltipSpec

@elastic/chartsExports


@elastic/charts / TooltipSpec

Interface: TooltipSpec<D, SI>

Spec used to configure tooltip for chart

Contents

Extends

Type parameters

D extends BaseDatum = Datum

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

Spec.chartType

Source

packages/charts/src/specs/index.ts:16


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 Placements will be used as fallback placements.

Inherited from

TooltipPortalSettings.fallbackPlacements

Source

packages/charts/src/components/portal/types.ts:104


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: "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

Inherited from

Spec.id

Source

packages/charts/src/specs/index.ts:14


maxTooltipItems

maxTooltipItems: number

Max number of tooltip items before showing only highlighted values

Source

packages/charts/src/specs/tooltip.ts:228


maxVisibleTooltipItems

maxVisibleTooltipItems: number

Max number of visible tooltip items before scrolling. Does not apply to custom tooltips

Source

packages/charts/src/specs/tooltip.ts:233


noActionsLoaded

noActionsLoaded: string | ComponentType<Object>

Shown in place of actions UI after loading async actions and finding none

Source

packages/charts/src/specs/tooltip.ts:208


offset?

offset?: number

Custom tooltip offset

Default Value

10

Inherited from

TooltipPortalSettings.offset

Source

packages/charts/src/components/portal/types.ts:124


pinningPrompt

pinningPrompt: string

Prompt displayed to indicate user can right-click for contextual menu

Source

packages/charts/src/specs/tooltip.ts:218


placement?

placement?: Placement

Preferred placement of tooltip relative to anchor.

This may not be the final placement given the positioning fallbacks.

Default Value

right (Placement:type) | Placement.Right

Inherited from

TooltipPortalSettings.placement

Source

packages/charts/src/components/portal/types.ts:99


selectionPrompt

selectionPrompt: string

Prompt displayed when tooltip is pinned but all actions are hidden

Source

packages/charts/src/specs/tooltip.ts:223


showNullValues

showNullValues: boolean

Show null values on the tooltip

Default Value

false

Source

packages/charts/src/specs/tooltip.ts:174


snap

snap: boolean

Whenever the tooltip needs to snap to the x/band position or not

Default Value

true

Source

packages/charts/src/specs/tooltip.ts:144


sort?

sort?: SeriesCompareFn

A SeriesSortFn to sort the tooltip values (top-bottom)

Source

packages/charts/src/specs/tooltip.ts:238


specType

specType: string

The type of spec, can be series, axis, annotation, settings etc

Inherited from

Spec.specType

Source

packages/charts/src/specs/index.ts:18


stickTo?

stickTo?: TooltipStickTo

Stick the tooltip to a specific position within the current cursor

Default Value

mousePosition

Source

packages/charts/src/specs/tooltip.ts:168


type

type: TooltipType

The (TooltipType:type) | TooltipType of the tooltip

Default Value

vertical

Source

packages/charts/src/specs/tooltip.ts:138


unit?

unit?: string

Unit for event (i.e. time, feet, count, etc.). Not currently used/implemented

Source

packages/charts/src/specs/tooltip.ts:157


Generated using typedoc-plugin-markdown and TypeDoc