# 介面:BarElement<T, O>

# 類型參數

名稱 類型
T extends BarProps = BarProps
O extends BarOptions = BarOptions

# 階層

# 屬性

# $animations

$animations: Record<keyof T, Animation>

# 繼承自

Element.$animations

# 定義於

core/core.element.ts:15 (開啟新視窗)


# active

active: boolean = false

# 繼承自

Element.active

# 定義於

core/core.element.ts:13 (開啟新視窗)


# options

options: O

# 繼承自

Element.options

# 定義於

core/core.element.ts:14 (開啟新視窗)


# x

x: number

# 繼承自

Element.x

# 定義於

core/core.element.ts:11 (開啟新視窗)


# y

y: number

# 繼承自

Element.y

# 定義於

core/core.element.ts:12 (開啟新視窗)

# 方法

# draw

draw(ctx, area?): void

# 參數

名稱 類型
ctx CanvasRenderingContext2D
area? ChartArea

# 回傳

void

# 繼承自

VisualElement.draw

# 定義於

types/index.d.ts:1796 (開啟新視窗)


# getCenterPoint

getCenterPoint(useFinalPosition?): Point

# 參數

名稱 類型
useFinalPosition? boolean

# 回傳

Point

# 繼承自

VisualElement.getCenterPoint

# 定義於

types/index.d.ts:1800 (開啟新視窗)


# getProps

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

取得每個屬性的目前或最終值。 可以回傳額外屬性 (整個物件)。

# 類型參數

名稱 類型
P extends keyof T[]

# 參數

名稱 類型 描述
props P 要取得的屬性
最終值? boolean 取得最終值(動畫目標)

# 回傳

Pick<T, P[number]>

# 繼承自

Element.getProps

# 定義於

core/core.element.ts:31 (開啟新視窗)

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

# 類型參數

名稱 類型
P extends string

# 參數

名稱 類型
props P[]
最終值? boolean

# 回傳

Partial<Record<P, unknown>>

# 繼承自

Element.getProps

# 定義於

core/core.element.ts:32 (開啟新視窗)


# getRange

Optional getRange(axis): number

# 參數

名稱 類型
axis "x" | "y"

# 回傳

number

# 繼承自

VisualElement.getRange

# 定義於

types/index.d.ts:1801 (開啟新視窗)


# hasValue

hasValue(): boolean

# 回傳

boolean

# 繼承自

Element.hasValue

# 定義於

core/core.element.ts:22 (開啟新視窗)


# inRange

inRange(mouseX, mouseY, useFinalPosition?): boolean

# 參數

名稱 類型
mouseX number
mouseY number
useFinalPosition? boolean

# 回傳

boolean

# 繼承自

VisualElement.inRange

# 定義於

types/index.d.ts:1797 (開啟新視窗)


# inXRange

inXRange(mouseX, useFinalPosition?): boolean

# 參數

名稱 類型
mouseX number
useFinalPosition? boolean

# 回傳

boolean

# 繼承自

VisualElement.inXRange

# 定義於

types/index.d.ts:1798 (開啟新視窗)


# inYRange

inYRange(mouseY, useFinalPosition?): boolean

# 參數

名稱 類型
mouseY number
useFinalPosition? boolean

# 回傳

boolean

# 繼承自

VisualElement.inYRange

# 定義於

types/index.d.ts:1799 (開啟新視窗)


# tooltipPosition

tooltipPosition(useFinalPosition): Point

# 參數

名稱 類型
useFinalPosition boolean

# 回傳

Point

# 繼承自

Element.tooltipPosition

# 定義於

core/core.element.ts:17 (開啟新視窗)