# 介面:TimeScale<O>
# 型別參數
名稱 | 型別 |
---|---|
O | extends TimeScaleOptions = TimeScaleOptions |
# 階層
Scale
<O
>↳
TimeScale
# 屬性
# $animations
• $animations: Record
<never
, Animation
>
# 繼承自
# 定義於
core/core.element.ts:15 (在新視窗開啟)
# active
• active: boolean
= false
# 繼承自
# 定義於
core/core.element.ts:13 (在新視窗開啟)
# axis
• axis: string
# 繼承自
# 定義於
types/index.d.ts:1276 (在新視窗開啟)
# bottom
• bottom: number
項目的底部邊緣。由佈局系統設定,且無法在更新中使用
# 繼承自
# 定義於
# chart
• Readonly
chart: Chart
<keyof ChartTypeRegistry
, (number
| [number
, number
] | Point
| BubbleDataPoint
)[], unknown
>
# 繼承自
# 定義於
types/index.d.ts:1266 (在新視窗開啟)
# ctx
• Readonly
ctx: CanvasRenderingContext2D
# 繼承自
# 定義於
types/index.d.ts:1265 (在新視窗開啟)
# fullSize
• fullSize: boolean
如果為 true,且項目為水平,則將垂直框向下推
# 繼承自
# 定義於
# height
• height: number
項目高度。在 update() 之後必須有效
# 繼承自
# 定義於
# id
• Readonly
id: string
# 繼承自
# 定義於
types/index.d.ts:1263 (在新視窗開啟)
# labelRotation
• labelRotation: number
# 繼承自
# left
• left: number
項目的左邊緣。由佈局系統設定,不能在更新中使用
# 繼承自
# 定義於
# max
• max: number
# 繼承自
# 定義於
# maxHeight
• maxHeight: number
# 繼承自
# 定義於
# maxWidth
• maxWidth: number
# 繼承自
# 定義於
# min
• min: number
# 繼承自
# 定義於
# options
• options: O
# 繼承自
# 定義於
core/core.element.ts:14 (開啟新視窗)
# paddingBottom
• paddingBottom: number
# 繼承自
# 定義於
# paddingLeft
• paddingLeft: number
# 繼承自
# 定義於
# paddingRight
• paddingRight: number
# 繼承自
# 定義於
# paddingTop
• paddingTop: number
# 繼承自
# 定義於
# position
• position: LayoutPosition
項目在圖表佈局中的位置。可能的值為
# 繼承自
# 定義於
# right
• right: number
項目的右邊緣。由佈局系統設定,不能在更新中使用
# 繼承自
# 定義於
# ticks
• ticks: Tick
[]
# 繼承自
# 定義於
# top
• top: number
項目的上邊緣。由佈局系統設定,不能在更新中使用
# 繼承自
# 定義於
# type
• Readonly
type: string
# 繼承自
# 定義於
# weight
• weight: number
用於對項目進行排序的權重。較高的權重離圖表區域較遠
# 繼承自
# 定義於
types/layout.d.ts:13 (在新視窗中開啟)
# width
• width: number
項目的寬度。必須在 update() 之後有效
# 繼承自
# 定義於
types/layout.d.ts:21 (在新視窗中開啟)
# x
• x: number
# 繼承自
# 定義於
core/core.element.ts:11 (在新視窗中開啟)
# y
• y: number
# 繼承自
# 定義於
core/core.element.ts:12 (在新視窗中開啟)
# 方法
# afterBuildTicks
▸ afterBuildTicks(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1361 (在新視窗中開啟)
# afterCalculateLabelRotation
▸ afterCalculateLabelRotation(): void
# 返回值
void
# 繼承自
Scale.afterCalculateLabelRotation
# 定義於
types/index.d.ts:1367 (在新視窗中開啟)
# afterDataLimits
▸ afterDataLimits(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1358 (在新視窗中開啟)
# afterFit
▸ afterFit(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1370 (在新視窗中開啟)
# afterSetDimensions
▸ afterSetDimensions(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1355 (在新視窗中開啟)
# afterTickToLabelConversion
▸ afterTickToLabelConversion(): void
# 返回值
void
# 繼承自
Scale.afterTickToLabelConversion
# 定義於
types/index.d.ts:1364 (在新視窗中開啟)
# afterUpdate
▸ afterUpdate(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1352 (在新視窗中開啟)
# beforeBuildTicks
▸ beforeBuildTicks(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1359 (在新視窗中開啟)
# beforeCalculateLabelRotation
▸ beforeCalculateLabelRotation(): void
# 返回值
void
# 繼承自
Scale.beforeCalculateLabelRotation
# 定義於
types/index.d.ts:1365 (在新視窗中開啟)
# beforeDataLimits
▸ beforeDataLimits(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1356 (在新視窗中開啟)
# beforeFit
▸ beforeFit(): void
# 返回值
void
# 繼承自
# 定義於
types/index.d.ts:1368 (在新視窗中開啟)
# beforeLayout
▸ Optional
beforeLayout(): void
在佈局流程開始前呼叫
# 返回值
void
# 繼承自
# 定義於
# beforeSetDimensions
▸ beforeSetDimensions(): void
# 返回
void
# 繼承自
# 定義於
# beforeTickToLabelConversion
▸ beforeTickToLabelConversion(): void
# 返回
void
# 繼承自
Scale.beforeTickToLabelConversion
# 定義於
# beforeUpdate
▸ beforeUpdate(): void
# 返回
void
# 繼承自
# 定義於
# buildTicks
▸ buildTicks(): Tick
[]
# 返回
Tick
[]
# 繼承自
# 定義於
# calculateLabelRotation
▸ calculateLabelRotation(): void
# 返回
void
# 繼承自
# 定義於
# configure
▸ configure(): void
# 返回
void
# 繼承自
# 定義於
# determineDataLimits
▸ determineDataLimits(): void
# 返回
void
# 繼承自
# 定義於
# draw
▸ draw(chartArea
): void
繪製元素
# 參數
名稱 | 型別 |
---|---|
chartArea | ChartArea |
# 返回
void
# 繼承自
# 定義於
# drawGrid
▸ drawGrid(chartArea
): void
# 參數
名稱 | 型別 |
---|---|
chartArea | ChartArea |
# 返回
void
# 繼承自
# 定義於
# drawLabels
▸ drawLabels(chartArea
): void
# 參數
名稱 | 型別 |
---|---|
chartArea | ChartArea |
# 返回
void
# 繼承自
# 定義於
# drawTitle
▸ drawTitle(chartArea
): void
# 參數
名稱 | 型別 |
---|---|
chartArea | ChartArea |
# 返回
void
# 繼承自
# 定義於
# fit
▸ fit(): void
# 返回
void
# 繼承自
# 定義於
# format
▸ format(value
, format?
): string
# 參數
名稱 | 型別 |
---|---|
value | number |
format? | string |
# 返回
string
# 定義於
# generateTickLabels
▸ generateTickLabels(ticks
): void
# 參數
名稱 | 型別 |
---|---|
ticks | Tick [] |
# 返回
void
# 繼承自
# 定義於
# getBasePixel
▸ getBasePixel(): number
傳回圖表最小值所對應的像素位置。座標 (0, 0) 位於畫布的左上角。
# 傳回值
number
# 繼承自
# 定義於
# getBaseValue
▸ getBaseValue(): number
# 傳回值
number
# 繼承自
# 定義於
# getDataTimestamps
▸ getDataTimestamps(): number
[]
# 傳回值
number
[]
# 定義於
# getDecimalForPixel
▸ getDecimalForPixel(pixel
): number
# 參數
名稱 | 型別 |
---|---|
pixel | number |
# 傳回值
number
# 繼承自
# 定義於
# getLabelForValue
▸ getLabelForValue(value
): string
用於取得在工具提示中顯示的指定值標籤
# 參數
名稱 | 型別 |
---|---|
value | number |
# 傳回值
string
# 繼承自
# 定義於
# getLabelItems
▸ getLabelItems(chartArea?
): LabelItem
[]
# 參數
名稱 | 型別 |
---|---|
chartArea? | ChartArea |
# 傳回值
# 繼承自
# 定義於
# getLabelTimestamps
▸ getLabelTimestamps(): string
[]
# 傳回值
string
[]
# 定義於
# getLabels
▸ getLabels(): string
[]
# 傳回值
string
[]
# 繼承自
# 定義於
# getLineWidthForValue
▸ getLineWidthForValue(value
): number
傳回指定值處的格線寬度
# 參數
名稱 | 型別 |
---|---|
value | number |
# 傳回值
number
# 繼承自
# 定義於
# getMatchingVisibleMetas
▸ getMatchingVisibleMetas(type?
): ChartMeta
<keyof ChartTypeRegistry
, default
<AnyObject
, AnyObject
>, default
<AnyObject
, AnyObject
>>[]
# 參數
名稱 | 型別 |
---|---|
type? | string |
# 傳回值
ChartMeta
<keyof ChartTypeRegistry
, default
<AnyObject
, AnyObject
>, default
<AnyObject
, AnyObject
>>[]
# 繼承自
# 定義於
# getMinMax
▸ getMinMax(canStack
): Object
# 參數
名稱 | 型別 |
---|---|
canStack | boolean |
# 傳回值
Object
名稱 | 型別 |
---|---|
max | number |
min | number |
# 繼承自
# 定義於
# getPadding
▸ Optional
getPadding(): ChartArea
傳回邊緣具有邊距的物件
# 傳回值
# 繼承自
# 定義於
# getPixelForDecimal
▸ getPixelForDecimal(decimal
): number
用於取得縮放比例百分比的像素位置的工具。座標 (0, 0) 位於畫布的左上角。
# 參數
名稱 | 型別 |
---|---|
decimal | number |
# 傳回值
number
# 繼承自
# 定義於
# getPixelForTick
▸ getPixelForTick(index
): number
傳回指定索引處刻度的位置。座標 (0, 0) 位於畫布的左上角。
# 參數
名稱 | 型別 |
---|---|
index | number |
# 傳回值
number
# 定義於
types/index.d.ts:1305 (opens new window)
# getPixelForValue
▸ getPixelForValue(value
, index?
): number
傳回給定資料點的位置。值可以是索引或數值。座標 (0, 0) 位於畫布的左上角
# 參數
value
, index?
): number
名稱 | 型別 |
---|---|
value | number |
index? | number |
# 傳回
number
# 繼承自
# 定義於
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
]>
# 繼承自
# 定義於
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
>>
# 繼承自
# 定義於
core/core.element.ts:32 (opens new window)
# getTicks
▸ getTicks(): Tick
[]
# 傳回
Tick
[]
# 繼承自
# 定義於
types/index.d.ts:1347 (opens new window)
# getUserBounds
▸ getUserBounds(): Object
# 傳回
Object
名稱 | 型別 |
---|---|
max | number |
maxDefined | boolean |
min | number |
minDefined | boolean |
# 繼承自
# 定義於
types/index.d.ts:1345 (opens new window)
# getValueForPixel
▸ getValueForPixel(pixel
): number
用於從給定的像素取得資料值。這是 getPixelForValue 的反向操作。座標 (0, 0) 位於畫布的左上角
# 參數
名稱 | 型別 |
---|---|
pixel | number |
# 傳回
number
# 繼承自
# 定義於
types/index.d.ts:1333 (opens new window)
# hasValue
▸ hasValue(): boolean
# 傳回
boolean
# 繼承自
# 定義於
core/core.element.ts:22 (opens new window)
# init
▸ init(options
): void
# 參數
名稱 | 型別 |
---|---|
options | O |
# 傳回
void
# 繼承自
# 定義於
types/index.d.ts:1343 (opens new window)
# isFullSize
▸ isFullSize(): boolean
# 傳回
boolean
# 繼承自
# 定義於
types/index.d.ts:1372 (opens new window)
# isHorizontal
▸ isHorizontal(): boolean
如果版面配置項目是水平的(即頂部或底部),則傳回 true。
# 傳回
boolean
# 繼承自
# 定義於
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
# 繼承自
# 定義於
types/index.d.ts:1344 (opens new window)
# setDimensions
▸ setDimensions(): void
# 回傳
void
# 繼承自
# 定義於
types/index.d.ts:1354 (在新視窗開啟)
# tooltipPosition
▸ tooltipPosition(useFinalPosition
): Point
# 參數
名稱 | 型別 |
---|---|
useFinalPosition | boolean |
# 回傳
# 繼承自
# 定義於
core/core.element.ts:17 (在新視窗開啟)
# update
▸ update(width
, height
, margins?
): void
接受兩個參數:width 和 height。
# 參數
名稱 | 型別 |
---|---|
width | number |
height | number |
margins? | ChartArea |
# 回傳
void