Skip to main content

BaseAnnotationSpec

@elastic/charts • Exports


@elastic/charts / BaseAnnotationSpec

Interface: BaseAnnotationSpec<T, AD, S, D>

Contents​

Extends​

Type parameters​

• T extends typeof AnnotationType.Rectangle | typeof AnnotationType.Line

• AD extends RectAnnotationDatum | LineAnnotationDatum<D>

• S extends RectAnnotationStyle | LineAnnotationStyle

• D = never

Properties​

animations?​

animations?: AnnotationAnimationConfig[]

Animation configurations for annotations

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:997


annotationType​

annotationType: T

Annotation type: line, rectangle

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:971


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​

AnnotationPortalSettings.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​

AnnotationPortalSettings.boundaryPadding

Source​

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


chartType​

chartType: "xy_axis"

Chart type define the type of chart that use this spec

Overrides​

Spec.chartType

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:966


customTooltip?​

customTooltip?: CustomAnnotationTooltip

The react component used to render a custom tooltip

Inherited from​

AnnotationPortalSettings.customTooltip

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:950


customTooltipDetails?​

customTooltipDetails?: AnnotationTooltipFormatter

The react component used to render a custom tooltip details

Inherited from​

AnnotationPortalSettings.customTooltipDetails

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:955


dataValues​

dataValues: AD[]

Data values defined with coordinates and details

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:980


fallbackPlacements?​

fallbackPlacements?: Placement[]

If given tooltip placement is not suitable, these Placements will be used as fallback placements.

Inherited from​

AnnotationPortalSettings.fallbackPlacements

Source​

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


groupId​

groupId: string

The ID of the axis group, needed for yDomain position

Default Value​

{@link DEFAULT_GLOBAL_ID}

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:976


hideTooltips?​

hideTooltips?: boolean

Toggles tooltip annotation visibility

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:988


id​

id: string

unique Spec identifier

Inherited from​

Spec.id

Source​

packages/charts/src/specs/spec_type.ts:29


offset?​

offset?: number

Custom tooltip offset

Default Value​

10

Inherited from​

AnnotationPortalSettings.offset

Source​

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


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​

AnnotationPortalSettings.placement

Source​

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


specType​

specType: "annotation"

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

Overrides​

Spec.specType

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:967


style?​

style?: RecursivePartial<S>

Custom annotation style

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:984


zIndex?​

zIndex?: number

z-index of the annotation relative to other elements in the chart Default specified per specific annotation spec.

Source​

packages/charts/src/chart_types/xy_chart/utils/specs.ts:993


Generated using typedoc-plugin-markdown and TypeDoc