# Interface: BarElement<T, O>

# Type parameters

Name Type
T extends BarProps = BarProps
O extends BarOptions = BarOptions

# Hierarchy

# Properties

# $animations

$animations: Record<keyof T, 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: O

# Inherited from

Element.options

# Defined in

core/core.element.ts:14 (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)

# Methods

# draw

draw(ctx, area?): void

# Parameters

Name Type
ctx CanvasRenderingContext2D
area? ChartArea

# Returns

void

# Inherited from

VisualElement.draw

# Defined in

types/index.d.ts:1796 (opens new window)


# getCenterPoint

getCenterPoint(useFinalPosition?): Point

# Parameters

Name Type
useFinalPosition? boolean

# Returns

Point

# Inherited from

VisualElement.getCenterPoint

# Defined in

types/index.d.ts:1800 (opens new window)


# getProps

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

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

# Type parameters

Name Type
P extends keyof T[]

# Parameters

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

# Returns

Pick<T, 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

Optional getRange(axis): number

# Parameters

Name Type
axis "x" | "y"

# Returns

number

# Inherited from

VisualElement.getRange

# Defined in

types/index.d.ts:1801 (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

# Inherited from

VisualElement.inRange

# Defined in

types/index.d.ts:1797 (opens new window)


# inXRange

inXRange(mouseX, useFinalPosition?): boolean

# Parameters

Name Type
mouseX number
useFinalPosition? boolean

# Returns

boolean

# Inherited from

VisualElement.inXRange

# Defined in

types/index.d.ts:1798 (opens new window)


# inYRange

inYRange(mouseY, useFinalPosition?): boolean

# Parameters

Name Type
mouseY number
useFinalPosition? boolean

# Returns

boolean

# Inherited from

VisualElement.inYRange

# Defined in

types/index.d.ts:1799 (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)