ReferenceArea
Child Components
Properties
xAxisIdString | Number
The id of x-axis which is corresponding to the data.
DEFAULT: 0
yAxisIdString | Number
The id of y-axis which is corresponding to the data.
DEFAULT: 0
x1Number | Stringoptional
A boundary value of the area. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys. If one of x1 or x2 is invalidate, the area will cover along x-axis.
x2Number | Stringoptional
A boundary value of the area. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys. If one of x1 or x2 is invalidate, the area will cover along x-axis.
y1Number | Stringoptional
A boundary value of the area. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys. If one of y1 or y2 is invalidate, the area will cover along y-axis.
y2Number | Stringoptional
A boundary value of the area. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys. If one of y1 or y2 is invalidate, the area will cover along y-axis.
ifOverflow'discard' | 'hidden' | 'visible' | 'extendDomain'
Defines how to draw the reference area if it falls partly outside the canvas. If set to 'discard', the reference area will not be drawn at all. If set to 'hidden', the reference area will be clipped to the canvas. If set to 'visible', the reference area will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference area fits into the canvas.
DEFAULT: 'discard'
viewBoxObject
The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.
labelString | Number | ReactElement | Functionoptional
If set a string or a number, default label will be drawn, and the option is content. If set a React element, the option is the custom react element of drawing label. If set a function, the function will be called to render customized label.
FORMAT:
<ReferenceArea x1="01" x2="08" label="MAX"/> <ReferenceArea y1={100} y2={500} label={<CustomizedLabel />}/>Examples:
shapeReactElement | Functionoptional
Renders a svg returned by the react element or function.
FORMAT:
<ReferenceArea shape={<CustomSvgShape/>}/>Examples: