# 介面:TimeScale<O>

# 型別參數

名稱 型別
O extends TimeScaleOptions = TimeScaleOptions

# 階層

# 屬性

# $animations

$animations: Record<never, Animation>

# 繼承自

Scale.$animations

# 定義於

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


# active

active: boolean = false

# 繼承自

Scale.active

# 定義於

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


# axis

axis: string

# 繼承自

Scale.axis

# 定義於

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


# bottom

bottom: number

項目的底部邊緣。由佈局系統設定,且無法在更新中使用

# 繼承自

Scale.bottom

# 定義於

types/layout.d.ts:41 (在新視窗開啟)


# chart

Readonly chart: Chart<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint)[], unknown>

# 繼承自

Scale.chart

# 定義於

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


# ctx

Readonly ctx: CanvasRenderingContext2D

# 繼承自

Scale.ctx

# 定義於

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


# fullSize

fullSize: boolean

如果為 true,且項目為水平,則將垂直框向下推

# 繼承自

Scale.fullSize

# 定義於

types/layout.d.ts:17 (在新視窗開啟)


# height

height: number

項目高度。在 update() 之後必須有效

# 繼承自

Scale.height

# 定義於

types/layout.d.ts:25 (在新視窗開啟)


# id

Readonly id: string

# 繼承自

Scale.id

# 定義於

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


# labelRotation

labelRotation: number

# 繼承自

Scale.# 定義於

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


# left

left: number

項目的左邊緣。由佈局系統設定,不能在更新中使用

# 繼承自

Scale.left

# 定義於

types/layout.d.ts:29 (開啟新視窗)


# max

max: number

# 繼承自

Scale.max

# 定義於

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


# maxHeight

maxHeight: number

# 繼承自

Scale.maxHeight

# 定義於

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


# maxWidth

maxWidth: number

# 繼承自

Scale.maxWidth

# 定義於

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


# min

min: number

# 繼承自

Scale.min

# 定義於

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


# options

options: O

# 繼承自

Scale.options

# 定義於

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


# paddingBottom

paddingBottom: number

# 繼承自

Scale.paddingBottom

# 定義於

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


# paddingLeft

paddingLeft: number

# 繼承自

Scale.paddingLeft

# 定義於

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


# paddingRight

paddingRight: number

# 繼承自

Scale.paddingRight

# 定義於

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


# paddingTop

paddingTop: number

# 繼承自

Scale.paddingTop

# 定義於

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


# position

position: LayoutPosition

項目在圖表佈局中的位置。可能的值為

# 繼承自

Scale.position

# 定義於

types/layout.d.ts:9 (開啟新視窗)


right: number

項目的右邊緣。由佈局系統設定,不能在更新中使用

# 繼承自

Scale.right

# 定義於

types/layout.d.ts:37 (開啟新視窗)


# ticks

ticks: Tick[]

# 繼承自

Scale.ticks

# 定義於

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


# top

top: number

項目的上邊緣。由佈局系統設定,不能在更新中使用

# 繼承自

Scale.top

# 定義於

types/layout.d.ts:33 (開啟新視窗)


# type

Readonly type: string

# 繼承自

Scale.type

# 定義於

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


# weight

weight: number

用於對項目進行排序的權重。較高的權重離圖表區域較遠

# 繼承自

Scale.weight

# 定義於

types/layout.d.ts:13 (在新視窗中開啟)


# width

width: number

項目的寬度。必須在 update() 之後有效

# 繼承自

Scale.width

# 定義於

types/layout.d.ts:21 (在新視窗中開啟)


# x

x: number

# 繼承自

Scale.x

# 定義於

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


# y

y: number

# 繼承自

Scale.y

# 定義於

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

# 方法

# afterBuildTicks

afterBuildTicks(): void

# 返回值

void

# 繼承自

Scale.afterBuildTicks

# 定義於

types/index.d.ts:1361 (在新視窗中開啟)


# afterCalculateLabelRotation

afterCalculateLabelRotation(): void

# 返回值

void

# 繼承自

Scale.afterCalculateLabelRotation

# 定義於

types/index.d.ts:1367 (在新視窗中開啟)


# afterDataLimits

afterDataLimits(): void

# 返回值

void

# 繼承自

Scale.afterDataLimits

# 定義於

types/index.d.ts:1358 (在新視窗中開啟)


# afterFit

afterFit(): void

# 返回值

void

# 繼承自

Scale.afterFit

# 定義於

types/index.d.ts:1370 (在新視窗中開啟)


# afterSetDimensions

afterSetDimensions(): void

# 返回值

void

# 繼承自

Scale.afterSetDimensions

# 定義於

types/index.d.ts:1355 (在新視窗中開啟)


# afterTickToLabelConversion

afterTickToLabelConversion(): void

# 返回值

void

# 繼承自

Scale.afterTickToLabelConversion

# 定義於

types/index.d.ts:1364 (在新視窗中開啟)


# afterUpdate

afterUpdate(): void

# 返回值

void

# 繼承自

Scale.afterUpdate

# 定義於

types/index.d.ts:1352 (在新視窗中開啟)


# beforeBuildTicks

beforeBuildTicks(): void

# 返回值

void

# 繼承自

Scale.beforeBuildTicks

# 定義於

types/index.d.ts:1359 (在新視窗中開啟)


# beforeCalculateLabelRotation

beforeCalculateLabelRotation(): void

# 返回值

void

# 繼承自

Scale.beforeCalculateLabelRotation

# 定義於

types/index.d.ts:1365 (在新視窗中開啟)


# beforeDataLimits

beforeDataLimits(): void

# 返回值

void

# 繼承自

Scale.beforeDataLimits

# 定義於

types/index.d.ts:1356 (在新視窗中開啟)


# beforeFit

beforeFit(): void

# 返回值

void

# 繼承自

Scale.beforeFit

# 定義於

types/index.d.ts:1368 (在新視窗中開啟)


# beforeLayout

Optional beforeLayout(): void

在佈局流程開始前呼叫

# 返回值

void

# 繼承自

Scale.beforeLayout

# 定義於

types/layout.d.ts:46 (開啟新視窗)


# beforeSetDimensions

beforeSetDimensions(): void

# 返回

void

# 繼承自

Scale.beforeSetDimensions

# 定義於

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


# beforeTickToLabelConversion

beforeTickToLabelConversion(): void

# 返回

void

# 繼承自

Scale.beforeTickToLabelConversion

# 定義於

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


# beforeUpdate

beforeUpdate(): void

# 返回

void

# 繼承自

Scale.beforeUpdate

# 定義於

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


# buildTicks

buildTicks(): Tick[]

# 返回

Tick[]

# 繼承自

Scale.buildTicks

# 定義於

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


# calculateLabelRotation

calculateLabelRotation(): void

# 返回

void

# 繼承自

Scale.calculateLabelRotation

# 定義於

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


# configure

configure(): void

# 返回

void

# 繼承自

Scale.configure

# 定義於

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


# determineDataLimits

determineDataLimits(): void

# 返回

void

# 繼承自

Scale.determineDataLimits

# 定義於

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


# draw

draw(chartArea): void

繪製元素

# 參數

名稱 型別
chartArea ChartArea

# 返回

void

# 繼承自

Scale.draw

# 定義於

types/layout.d.ts:50 (開啟新視窗)


# drawGrid

drawGrid(chartArea): void

# 參數

名稱 型別
chartArea ChartArea

# 返回

void

# 繼承自

Scale.drawGrid

# 定義於

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


# drawLabels

drawLabels(chartArea): void

# 參數

名稱 型別
chartArea ChartArea

# 返回

void

# 繼承自

Scale.drawLabels

# 定義於

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


# drawTitle

drawTitle(chartArea): void

# 參數

名稱 型別
chartArea ChartArea

# 返回

void

# 繼承自

Scale.drawTitle

# 定義於

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


# fit

fit(): void

# 返回

void

# 繼承自

Scale.fit

# 定義於

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


# format

format(value, format?): string

# 參數

名稱 型別
value number
format? string

# 返回

string

# 定義於

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


# generateTickLabels

generateTickLabels(ticks): void

# 參數

名稱 型別
ticks Tick[]

# 返回

void

# 繼承自

Scale.generateTickLabels

# 定義於

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


# getBasePixel

getBasePixel(): number

傳回圖表最小值所對應的像素位置。座標 (0, 0) 位於畫布的左上角。

# 傳回值

number

# 繼承自

Scale.getBasePixel

# 定義於

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


# getBaseValue

getBaseValue(): number

# 傳回值

number

# 繼承自

Scale.getBaseValue

# 定義於

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


# getDataTimestamps

getDataTimestamps(): number[]

# 傳回值

number[]

# 定義於

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


# getDecimalForPixel

getDecimalForPixel(pixel): number

# 參數

名稱 型別
pixel number

# 傳回值

number

# 繼承自

Scale.getDecimalForPixel

# 定義於

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


# getLabelForValue

getLabelForValue(value): string

用於取得在工具提示中顯示的指定值標籤

# 參數

名稱 型別
value number

# 傳回值

string

# 繼承自

Scale.getLabelForValue

# 定義於

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


# getLabelItems

getLabelItems(chartArea?): LabelItem[]

# 參數

名稱 型別
chartArea? ChartArea

# 傳回值

LabelItem[]

# 繼承自

Scale.getLabelItems

# 定義於

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


# getLabelTimestamps

getLabelTimestamps(): string[]

# 傳回值

string[]

# 定義於

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


# getLabels

getLabels(): string[]

# 傳回值

string[]

# 繼承自

Scale.getLabels

# 定義於

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


# getLineWidthForValue

getLineWidthForValue(value): number

傳回指定值處的格線寬度

# 參數

名稱 型別
value number

# 傳回值

number

# 繼承自

Scale.getLineWidthForValue

# 定義於

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


# getMatchingVisibleMetas

getMatchingVisibleMetas(type?): ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>[]

# 參數

名稱 型別
type? string

# 傳回值

ChartMeta<keyof ChartTypeRegistry, default<AnyObject, AnyObject>, default<AnyObject, AnyObject>>[]

# 繼承自

Scale.getMatchingVisibleMetas

# 定義於

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


# getMinMax

getMinMax(canStack): Object

# 參數

名稱 型別
canStack boolean

# 傳回值

Object

名稱 型別
max number
min number

# 繼承自

Scale.getMinMax

# 定義於

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


# getPadding

Optional getPadding(): ChartArea

傳回邊緣具有邊距的物件

# 傳回值

ChartArea

# 繼承自

Scale.getPadding

# 定義於

types/layout.d.ts:54 (開啟新視窗)


# getPixelForDecimal

getPixelForDecimal(decimal): number

用於取得縮放比例百分比的像素位置的工具。座標 (0, 0) 位於畫布的左上角。

# 參數

名稱 型別
decimal number

# 傳回值

number

# 繼承自

Scale.getPixelForDecimal

# 定義於

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


# getPixelForTick

getPixelForTick(index): number

傳回指定索引處刻度的位置。座標 (0, 0) 位於畫布的左上角。

# 參數

名稱 型別
index number

# 傳回值

number

Scale.getPixelForTick

# 定義於

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


# getPixelForValue

getPixelForValue(value, index?): number

傳回給定資料點的位置。值可以是索引或數值。座標 (0, 0) 位於畫布的左上角

# 參數

名稱 型別
value number
index? number

# 傳回

number

# 繼承自

Scale.getPixelForValue

# 定義於

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


# getProps

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

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

# 類型參數

名稱 型別
P extends never[]

# 參數

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

# 傳回

Pick<unknown, P[number]>

# 繼承自

Scale.getProps

# 定義於

core/core.element.ts:31 (opens new window)

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

# 類型參數

名稱 型別
P extends string

# 參數

名稱 型別
props P[]
final? boolean

# 傳回

Partial<Record<P, unknown>>

# 繼承自

Scale.getProps

# 定義於

core/core.element.ts:32 (opens new window)


# getTicks

getTicks(): Tick[]

# 傳回

Tick[]

# 繼承自

Scale.getTicks

# 定義於

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


# getUserBounds

getUserBounds(): Object

# 傳回

Object

名稱 型別
max number
maxDefined boolean
min number
minDefined boolean

# 繼承自

Scale.getUserBounds

# 定義於

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


# getValueForPixel

getValueForPixel(pixel): number

用於從給定的像素取得資料值。這是 getPixelForValue 的反向操作。座標 (0, 0) 位於畫布的左上角

# 參數

名稱 型別
pixel number

# 傳回

number

# 繼承自

Scale.getValueForPixel

# 定義於

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


# hasValue

hasValue(): boolean

# 傳回

boolean

# 繼承自

Scale.hasValue

# 定義於

core/core.element.ts:22 (opens new window)


# init

init(options): void

# 參數

名稱 型別
options O

# 傳回

void

# 繼承自

Scale.init

# 定義於

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


# isFullSize

isFullSize(): boolean

# 傳回

boolean

# 繼承自

Scale.isFullSize

# 定義於

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


# isHorizontal

isHorizontal(): boolean

如果版面配置項目是水平的(即頂部或底部),則傳回 true。

# 傳回

boolean

# 繼承自

Scale.isHorizontal

# 定義於

types/layout.d.ts:58 (opens new window)


# normalize

normalize(values): number[]

# 參數

名稱 型別
values number[]

# 傳回

number[]

# 定義於

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


# parse

parse(raw, index?): unknown

# 參數

名稱 型別
raw unknown
index? number

# 傳回

unknown

# 繼承自

Scale.parse

# 定義於

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


# setDimensions

setDimensions(): void

# 回傳

void

# 繼承自

Scale.setDimensions

# 定義於

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


# tooltipPosition

tooltipPosition(useFinalPosition): Point

# 參數

名稱 型別
useFinalPosition boolean

# 回傳

Point

# 繼承自

Scale.tooltipPosition

# 定義於

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


# update

update(width, height, margins?): void

接受兩個參數:width 和 height。

# 參數

名稱 型別
width number
height number
margins? ChartArea

# 回傳

void

# 繼承自

Scale.update

# 定義於

types/layout.d.ts:64 (在新視窗開啟)