Skip to main content

LineAnnotationSpec

@elastic/chartsExports


@elastic/charts / LineAnnotationSpec

Type alias: LineAnnotationSpec<D>

LineAnnotationSpec<D>: BaseAnnotationSpec<typeof AnnotationType.Line, LineAnnotationDatum<D>, LineAnnotationStyle, D> & Object

Type declaration

domainType

domainType: AnnotationDomainType

hideLines?

hideLines?: boolean

Annotation lines are hidden

hideLinesTooltips?

hideLinesTooltips?: boolean

Hide tooltip when hovering over the line

Default Value

true

marker?

marker?: ReactNode | ComponentWithAnnotationDatum<D>

Optional Custom marker icon centered on data value

markerBody?

markerBody?: ReactNode | ComponentWithAnnotationDatum<D>

Optional marker body, always contained within chart area

markerDimensions?

markerDimensions?: Object

Custom marker dimensions; will be computed internally Any user-supplied values will be overwritten

markerDimensions.height

markerDimensions.height: number

markerDimensions.width

markerDimensions.width: number

markerPosition?

markerPosition?: Position

An optional marker position.

Remarks

The default position, if this property is not specified, falls back to the linked axis position (if available). If no axis present on the chart, the marker position is positioned by default on the bottom on the X domain and on the left of the chart for the Y domain. The specified position is an absolute position and reflect the spatial position of the marker independently from the chart rotation.

zIndex?

zIndex?: number

z-index of the annotation relative to other elements in the chart

Default Value

1

Type parameters

D = any

Source

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


Generated using typedoc-plugin-markdown and TypeDoc