# Class: PointElement

# Hierarchy

# Constructors

# constructor

new PointElement(cfg)

# Parameters

Name Type
cfg any

# Overrides

Element<PointProps, PointOptions & PointHoverOptions&gt;.constructor

# Defined in

elements/element.point.ts:49 (opens new window)

# Properties

# $animations

$animations: Record<keyof Point, Animation>

# Inherited from

Element.$animations

# Defined in

core/core.element.ts:15 (opens new window)


# active

active: boolean = false

# Inherited from

Element.active

# Defined in

core/core.element.ts:13 (opens new window)


# options

options: PointOptions & PointHoverOptions

# Inherited from

Element.options

# Defined in

core/core.element.ts:14 (opens new window)


# parsed

parsed: CartesianParsedData

# Defined in

elements/element.point.ts:24 (opens new window)


# skip

Optional skip: boolean

# Defined in

elements/element.point.ts:25 (opens new window)


# stop

Optional stop: boolean

# Defined in

elements/element.point.ts:26 (opens new window)


# x

x: number

# Inherited from

Element.x

# Defined in

core/core.element.ts:11 (opens new window)


# y

y: number

# Inherited from

Element.y

# Defined in

core/core.element.ts:12 (opens new window)


# defaultRoutes

Static defaultRoutes: Object

# Type declaration

Name Type
backgroundColor string
borderColor string

# Overrides

Element.defaultRoutes

# Defined in

elements/element.point.ts:44 (opens new window)


# defaults

Static defaults: Object

# Type declaration

Name Type
borderWidth number
hitRadius number
hoverBorderWidth number
hoverRadius number
pointStyle string
radius number
rotation number

# Overrides

Element.defaults

# Defined in

elements/element.point.ts:31 (opens new window)


# id

Static id: string = 'point'

# Defined in

elements/element.point.ts:22 (opens new window)

# Methods

# draw

draw(ctx, area): void

# Parameters

Name Type
ctx CanvasRenderingContext2D
area ChartArea

# Returns

void

# Defined in

elements/element.point.ts:89 (opens new window)


# getCenterPoint

getCenterPoint(useFinalPosition?): Object

# Parameters

Name Type
useFinalPosition? boolean

# Returns

Object

Name Type
x number
y number

# Defined in

elements/element.point.ts:76 (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

Name Type
P extends keyof Point[]

# Parameters

Name Type Description
props P properties to get
final? boolean get the final value (animation target)

# Returns

Pick<Point, P[number]>

# Inherited from

Element.getProps

# Defined in

core/core.element.ts:31 (opens new window)

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

# Type parameters

Name Type
P extends string

# Parameters

Name Type
props P[]
final? boolean

# Returns

Partial<Record<P, unknown>>

# Inherited from

Element.getProps

# Defined in

core/core.element.ts:32 (opens new window)


# getRange

getRange(): any

# Returns

any

# Defined in

elements/element.point.ts:102 (opens new window)


# hasValue

hasValue(): boolean

# Returns

boolean

# Inherited from

Element.hasValue

# Defined in

core/core.element.ts:22 (opens new window)


# inRange

inRange(mouseX, mouseY, useFinalPosition?): boolean

# Parameters

Name Type
mouseX number
mouseY number
useFinalPosition? boolean

# Returns

boolean

# Defined in

elements/element.point.ts:62 (opens new window)


# inXRange

inXRange(mouseX, useFinalPosition?): boolean

# Parameters

Name Type
mouseX number
useFinalPosition? boolean

# Returns

boolean

# Defined in

elements/element.point.ts:68 (opens new window)


# inYRange

inYRange(mouseY, useFinalPosition?): boolean

# Parameters

Name Type
mouseY number
useFinalPosition? boolean

# Returns

boolean

# Defined in

elements/element.point.ts:72 (opens new window)


# size

size(options?): number

# Parameters

Name Type
options? Partial<PointOptions & PointHoverOptions>

# Returns

number

# Defined in

elements/element.point.ts:81 (opens new window)


# tooltipPosition

tooltipPosition(useFinalPosition): Point

# Parameters

Name Type
useFinalPosition boolean

# Returns

Point

# Inherited from

Element.tooltipPosition

# Defined in

core/core.element.ts:17 (opens new window)