# 接口:BarElement
# 类型参数
| 名称 | 类型 |
|---|---|
T | 继承自 BarProps = BarProps |
O | 继承自 BarOptions = BarOptions |
# 类层次
default<T,O>-
└─
BarElement
# 属性
# $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
# 继承自
# 定义于
# getCenterPoint
▸ getCenterPoint(useFinalPosition?): Point
# 参数
| 名称 | 类型 |
|---|---|
useFinalPosition? | |
# 返回值
# 继承自
# 定义于
# getProps
▸ getProps<P>(props, final?): Pick<T, P[number]>
获取每个属性的当前或最终值。可以返回额外的属性(整个对象)。
# 类型参数
| 名称 | 类型 |
|---|---|
P | extends keyof T[] |
# 参数
| 名称 | 类型 | 描述 |
|---|---|---|
props | P | 要获取的属性 |
final? | | 获取最终值(动画目标) |
# 返回值
Pick<T, P[number]>
# 继承自
Element.getProps
# 定义于
core/core.element.ts:31 (打开新窗口)
▸ getProps<P>(props, final?): Partial<Record<P, unknown>>
# 类型参数
| 名称 | 类型 |
|---|---|
P | extends string |
# 参数
| 名称 | 类型 |
|---|---|
props | P[] |
final? | |
# 返回值
Partial<Record<P, unknown>>
# 继承自
Element.getProps
# 定义于
core/core.element.ts:32 (打开新窗口)
# getRange
▸ Optional getRange(axis): number
# 参数
| 名称 | 类型 |
|---|---|
axis | "x" | "y" |
# 返回值
number
# 继承自
## 定义于
types/index.d.ts:1801 (在新窗口中打开)
## hasValue
▸ hasValue(): boolean
## 返回值
boolean
## 继承自
Element.hasValue
## 定义于
core/core.element.ts:22 (在新窗口中打开)
## inRange
▸ inRange(mouseX, mouseY, useFinalPosition?): boolean
## 参数
| 名称 | 类型 |
|---|---|
mouseX | |
mouseY | |
useFinalPosition? | |
## 返回值
boolean
## 继承自
## 定义于
types/index.d.ts:1797 (在新窗口中打开)
## inXRange
▸ inXRange(mouseX, useFinalPosition?): boolean
## 参数
| 名称 | 类型 |
|---|---|
mouseX | |
useFinalPosition? | |
## 返回值
boolean
## 继承自
## 定义于
types/index.d.ts:1798 (在新窗口中打开)
## inYRange
▸ inYRange(mouseY, useFinalPosition?): boolean
## 参数
| 名称 | 类型 |
|---|---|
mouseY | |
useFinalPosition? | |
## 返回值
boolean
## 继承自
## 定义于
types/index.d.ts:1799 (在新窗口中打开)
## tooltipPosition
▸ tooltipPosition(useFinalPosition): Point
## 参数
| 名称 | 类型 |
|---|---|
useFinalPosition | |
# 返回值
# 继承自
Element.tooltipPosition