# 介面:LineElement<T, O>
# 型別參數
名稱 | 型別 |
---|---|
T | extends LineProps = LineProps |
O | extends LineOptions = LineOptions |
# 階層
default
<T
,O
>-
↳
LineElement
# 屬性
# $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 (開啟新視窗)
# points
• points: Point
[]
# 定義於
# segments
• Readonly
segments: Segment
[]
# 定義於
# 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
# 繼承自
# 定義於
# first
▸ first(): false
| Point
# 返回值
false
| Point
# 定義於
# getCenterPoint
▸ getCenterPoint(useFinalPosition?
): Point
# 參數
名稱 | 型別 |
---|---|
useFinalPosition? | boolean |
# 返回值
# 繼承自
# 定義於
# getProps
▸ getProps<P
>(props
, final?
): Pick
<T
, P
[number
]>
取得每個屬性的目前或最終值。可以回傳額外的屬性 (整個物件)。
# 類型參數
名稱 | 型別 |
---|---|
P | extends keyof T [] |
# 參數
名稱 | 型別 | 描述 |
---|---|---|
props | P | 要取得的屬性 |
final? | 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 [] |
final? | boolean |
# 回傳
Partial
<Record
<P
, unknown
>>
# 繼承自
Element.getProps
# 定義於
core/core.element.ts:32 (開啟新視窗)
# getRange
▸ Optional
getRange(axis
): number
# 參數
名稱 | 型別 |
---|---|
axis | "x" | "y" |
# 回傳
number
# 繼承自
# 定義於
# hasValue
▸ hasValue(): boolean
# 回傳
boolean
# 繼承自
Element.hasValue
# 定義於
core/core.element.ts:22 (開啟新視窗)
# inRange
▸ inRange(mouseX
, mouseY
, useFinalPosition?
): boolean
# 參數
名稱 | 型別 |
---|---|
mouseX | number |
mouseY | number |
useFinalPosition? | boolean |
# 回傳
boolean
# 繼承自
# 定義於
# inXRange
▸ inXRange(mouseX
, useFinalPosition?
): boolean
# 參數
名稱 | 型別 |
---|---|
mouseX | number |
useFinalPosition? | boolean |
# 回傳
boolean
# 繼承自
# 定義於
# inYRange
▸ inYRange(mouseY
, useFinalPosition?
): boolean
# 參數
名稱 | 型別 |
---|---|
mouseY | number |
useFinalPosition? | boolean |
# 回傳
boolean
# 繼承自
# 定義於
# interpolate
▸ interpolate(point
, property
): Point
| Point
[]
# 參數
名稱 | 型別 |
---|---|
point | Point |
property | "x" | "y" |
# 回傳
# 定義於
# last
▸ last(): false
| Point
# 回傳
false
| Point
# 定義於
# path
▸ path(ctx
): boolean
# 參數
名稱 | 型別 |
---|---|
ctx | CanvasRenderingContext2D |
# 回傳
boolean
# 定義於
# pathSegment
▸ pathSegment(ctx
, segment
, params
): boolean
# 參數
名稱 | 型別 |
---|---|
ctx | CanvasRenderingContext2D |
segment | Segment |
params | AnyObject |
# 回傳
boolean
# 定義於
# tooltipPosition
▸ tooltipPosition(useFinalPosition
): Point
# 參數
名稱 | 型別 |
---|---|
useFinalPosition | boolean |
# 回傳
# 繼承自
Element.tooltipPosition
# 定義於
core/core.element.ts:17 (開啟新視窗)
# updateControlPoints
▸ updateControlPoints(chartArea
, indexAxis?
): void
# 參數
名稱 | 型別 |
---|---|
chartArea | ChartArea |
indexAxis? | "x" | "y" |
# 回傳
void