Class: PointElement

Hierarchy

Constructors

constructor

new PointElement(cfg)

Parameters

NameType
cfgany

Overrides

Element<PointProps, PointOptions & PointHoverOptions>.constructor

Defined in

elements/element.point.ts:49PointElement - 图1 (opens new window)

Properties

$animations

$animations: Record<keyof Point, Animation>

Inherited from

Element.$animations

Defined in

core/core.element.ts:15PointElement - 图2 (opens new window)


active

active: boolean = false

Inherited from

Element.active

Defined in

core/core.element.ts:13PointElement - 图3 (opens new window)


options

options: PointOptions & PointHoverOptions

Inherited from

Element.options

Defined in

core/core.element.ts:14PointElement - 图4 (opens new window)


parsed

parsed: CartesianParsedData

Defined in

elements/element.point.ts:24PointElement - 图5 (opens new window)


skip

Optional skip: boolean

Defined in

elements/element.point.ts:25PointElement - 图6 (opens new window)


stop

Optional stop: boolean

Defined in

elements/element.point.ts:26PointElement - 图7 (opens new window)


x

x: number

Inherited from

Element.x

Defined in

core/core.element.ts:11PointElement - 图8 (opens new window)


y

y: number

Inherited from

Element.y

Defined in

core/core.element.ts:12PointElement - 图9 (opens new window)


defaultRoutes

Static defaultRoutes: Object

Type declaration

NameType
backgroundColorstring
borderColorstring

Overrides

Element.defaultRoutes

Defined in

elements/element.point.ts:44PointElement - 图10 (opens new window)


defaults

Static defaults: Object

Type declaration

NameType
borderWidthnumber
hitRadiusnumber
hoverBorderWidthnumber
hoverRadiusnumber
pointStylestring
radiusnumber
rotationnumber

Overrides

Element.defaults

Defined in

elements/element.point.ts:31PointElement - 图11 (opens new window)


id

Static id: string = 'point'

Defined in

elements/element.point.ts:22PointElement - 图12 (opens new window)

Methods

draw

draw(ctx, area): void

Parameters

NameType
ctxCanvasRenderingContext2D
areaChartArea

Returns

void

Defined in

elements/element.point.ts:89PointElement - 图13 (opens new window)


getCenterPoint

getCenterPoint(useFinalPosition?): Object

Parameters

NameType
useFinalPosition?boolean

Returns

Object

NameType
xnumber
ynumber

Defined in

elements/element.point.ts:76PointElement - 图14 (opens new window)


getProps

getProps<P>(props, final?): Pick<Point, P[number]>

Gets the current or final value of each prop. Can return extra properties (whole object).

Type parameters

NameType
Pextends keyof Point[]

Parameters

NameTypeDescription
propsPproperties to get
final?booleanget the final value (animation target)

Returns

Pick<Point, P[number]>

Inherited from

Element.getProps

Defined in

core/core.element.ts:31PointElement - 图15 (opens new window)

getProps<P>(props, final?): Partial<Record<P, unknown>>

Type parameters

NameType
Pextends string

Parameters

NameType
propsP[]
final?boolean

Returns

Partial<Record<P, unknown>>

Inherited from

Element.getProps

Defined in

core/core.element.ts:32PointElement - 图16 (opens new window)


getRange

getRange(): any

Returns

any

Defined in

elements/element.point.ts:102PointElement - 图17 (opens new window)


hasValue

hasValue(): boolean

Returns

boolean

Inherited from

Element.hasValue

Defined in

core/core.element.ts:22PointElement - 图18 (opens new window)


inRange

inRange(mouseX, mouseY, useFinalPosition?): boolean

Parameters

NameType
mouseXnumber
mouseYnumber
useFinalPosition?boolean

Returns

boolean

Defined in

elements/element.point.ts:62PointElement - 图19 (opens new window)


inXRange

inXRange(mouseX, useFinalPosition?): boolean

Parameters

NameType
mouseXnumber
useFinalPosition?boolean

Returns

boolean

Defined in

elements/element.point.ts:68PointElement - 图20 (opens new window)


inYRange

inYRange(mouseY, useFinalPosition?): boolean

Parameters

NameType
mouseYnumber
useFinalPosition?boolean

Returns

boolean

Defined in

elements/element.point.ts:72PointElement - 图21 (opens new window)


size

size(options?): number

Parameters

NameType
options?Partial<PointOptions & PointHoverOptions>

Returns

number

Defined in

elements/element.point.ts:81PointElement - 图22 (opens new window)


tooltipPosition

tooltipPosition(useFinalPosition): Point

Parameters

NameType
useFinalPositionboolean

Returns

Point

Inherited from

Element.tooltipPosition

Defined in

core/core.element.ts:17PointElement - 图23 (opens new window)