LineAnnotation
Spec
Defines a line annotation in the chart.
Overview
Compatible Specs
LineAnnotation
spec can be used multiple times along with any of the following specs:
Global Specs
Specs
Axis
AreaSeries
LineSeries
BarSeries
BubbleSeries
HistogramBarSeries
LineAnnotation
RectAnnotation
Props
All props can be found via LineAnnotationProps
type.
BaseAnnotationSpec
Props
Inherits BaseAnnotationSpec
props
domainType
- Type:
domainType: AnnotationDomainType
marker
- Type:
marker?: ReactNode | ComponentWithAnnotationDatum<D>
Optional Custom marker icon centered on data value
markerBody
- Type:
markerBody?: ReactNode | ComponentWithAnnotationDatum<D>
Optional marker body, always contained within chart area
markerDimensions
- Type:
markerDimensions?: { width: number; height: number }
Custom marker dimensions; will be computed internally. Any user-supplied values will be overwritten
markerPosition
- Type:
markerPosition?: Position
An optional marker position.
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.
hideLines
- Type:
hideLines?: boolean
Annotation lines are hidden
zIndex
- Type:
zIndex?: number
- Default:
1
z-index of the annotation relative to other elements in the chart