Components

Reference Elements

Annotate charts with reference dots, lines, and areas

<ReferenceDot>, <ReferenceLine>, and <ReferenceArea> add visual annotations to cartesian charts — highlighting thresholds, targets, or regions of interest.

ReferenceDot

Mark a specific data point:

Custom shape slot

Use the #shape slot to render a custom shape instead of the default dot:

ReferenceLine

Draw a horizontal or vertical reference line:

Vertical line

<ReferenceLine x="Mar" stroke="#14b8a6" />

ReferenceArea

Highlight a region between two coordinates:

Overflow behavior

Control what happens when a reference element falls outside the chart domain using if-overflow:

ValueBehavior
'discard'Hide when outside domain (default)
'hidden'Render but clip to chart area
'visible'Render even outside chart area
'extendDomain'Extend axis domain to include the element
<ReferenceDot x="Mar" :y="9999" if-overflow="extendDomain" />

ReferenceDot props

PropTypeDefaultDescription
xnumber | stringX-axis coordinate
ynumber | stringY-axis coordinate
rnumber10Dot radius
fillstring'#fff'Dot fill color
strokestring'#ccc'Dot stroke color
labelstring | number | objectLabel text or Label props
ifOverflowstring'discard'Overflow behavior
xAxisIdnumber | string0Target X axis ID
yAxisIdnumber | string0Target Y axis ID

ReferenceDot slots

SlotPropsDescription
#shape{ cx, cy, r, fill, stroke, clipPath }Custom shape rendering

ReferenceLine props

PropTypeDefaultDescription
xnumber | stringX value for vertical line
ynumber | stringY value for horizontal line
strokestring'#ccc'Line stroke color
strokeWidthnumber | string1Line stroke width
labelstring | number | objectLabel text or Label props
ifOverflowstring'discard'Overflow behavior
xAxisIdnumber | string0Target X axis ID
yAxisIdnumber | string0Target Y axis ID

ReferenceArea props

PropTypeDefaultDescription
x1number | stringStart X coordinate
x2number | stringEnd X coordinate
y1number | stringStart Y coordinate
y2number | stringEnd Y coordinate
fillstring'#ccc'Area fill color
fillOpacitynumber0.5Fill opacity
strokestring'none'Border stroke color
radiusnumber | number[]0Corner radius
labelstring | number | objectLabel text or Label props
ifOverflowstring'discard'Overflow behavior
xAxisIdnumber | string0Target X axis ID
yAxisIdnumber | string0Target Y axis ID
Copyright © 2026