Crosshair

2 min read

Crosshair

A crosshair.

Usage

import { LineCrosshair, CircleCrosshair, PolygonCrosshair } from '@antv/gui';

Basic Options

KeyDescriptionTypeDefault
lineStyleconfig the style of crosshair lineLineProps
texttagTagCfg

LineCrosshair

KeyDescriptionTypeDefault
startPosstart pos of crosshair line[number, number]
endPosend pos of crosshair line[number, number]

CircleCrosshair

KeyDescriptionTypeDefault
centercenter of crosshair circle[number, number]
defaultRadiusthe radius of first crosshair circlenumber0

PolygonCrosshair

KeyDescriptionTypeDefault
centercenter of crosshair polygon[number, number]
defaultRadiusthe radius of first crosshair polygonnumber0
startAnglestart angle of polygonnumber0
sidessides of polygonnumber