# 介面:LineElement<T, O>

# 型別參數

名稱 型別
T extends LineProps = LineProps
O extends LineOptions = LineOptions

# 階層

# 屬性

# $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[]

# 定義於

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


# segments

Readonly segments: Segment[]

# 定義於

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


# 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 (開啟新視窗)


# first

first(): false | Point

# 返回值

false | Point

# 定義於

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


# 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 要取得的屬性
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

# 繼承自

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 (開啟新視窗)


# interpolate

interpolate(point, property): Point | Point[]

# 參數

名稱 型別
point Point
property "x" | "y"

# 回傳

Point | Point[]

# 定義於

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


# last

last(): false | Point

# 回傳

false | Point

# 定義於

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


# path

path(ctx): boolean

# 參數

名稱 型別
ctx CanvasRenderingContext2D

# 回傳

boolean

# 定義於

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


# pathSegment

pathSegment(ctx, segment, params): boolean

# 參數

名稱 型別
ctx CanvasRenderingContext2D
segment Segment
params AnyObject

# 回傳

boolean

# 定義於

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


# tooltipPosition

tooltipPosition(useFinalPosition): Point

# 參數

名稱 型別
useFinalPosition boolean

# 回傳

Point

# 繼承自

Element.tooltipPosition

# 定義於

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


# updateControlPoints

updateControlPoints(chartArea, indexAxis?): void

# 參數

名稱 型別
chartArea ChartArea
indexAxis? "x" | "y"

# 回傳

void

# 定義於

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