# 介面:TickOptions
# 屬性
# backdropColor
• backdropColor: Scriptable
<Color
, ScriptableScaleContext
>
標籤背景的顏色。
預設值
'rgba(255, 255, 255, 0.75)'
# 定義於
# backdropPadding
• backdropPadding: number
| ChartArea
刻度背景的內距。
預設值
2
# 定義於
# callback
• callback: (this
: Scale
<CoreScaleOptions
>, tickValue
: string
| number
, index
: number
, ticks
: Tick
[]) => string
| number
| string
[] | number
[]
# 型別宣告
▸ (this
, tickValue
, index
, ticks
): string
| number
| string
[] | number
[]
返回刻度值的字串表示形式,該值應顯示在圖表上。請參閱 callback。
# 參數
名稱 | 型別 |
---|---|
this | Scale <CoreScaleOptions > |
tickValue | string | number |
index | number |
ticks | Tick [] |
# 返回值
string
| number
| string
[] | number
[]
# 定義於
# color
• color: ScriptableAndArray
<Color
, ScriptableScaleContext
>
刻度的顏色
請參閱
Defaults.color
# 定義於
# display
• display: boolean
如果為 true,則顯示刻度標籤。
預設值
true
# 定義於
# font
• font: ScriptableAndScriptableOptions
<Partial
<FontSpec
>, ScriptableScaleContext
>
請參閱 字體
# 定義於
# major
• major: Object
# 型別宣告
名稱 | 型別 | 描述 |
---|---|---|
enabled | boolean | 如果為 true,則會產生主要刻度。主要刻度會影響自動跳過,且主要刻度會在可腳本選項內容中定義在刻度上。預設值 為 false |
# 定義於
# padding
• padding: number
設定刻度標籤與軸的偏移量
# 定義於
types/index.d.ts:3059 (在新視窗開啟)
# showLabelBackdrop
• showLabelBackdrop: Scriptable
<boolean
, ScriptableScaleContext
>
若為 true,則在刻度標籤後方繪製背景。
預設值
false
# 定義於
types/index.d.ts:3064 (在新視窗開啟)
# textStrokeColor
• textStrokeColor: Scriptable
<Color
, ScriptableScaleContext
>
文字周圍描邊的顏色。
預設值
undefined
# 定義於
types/index.d.ts:3069 (在新視窗開啟)
# textStrokeWidth
• textStrokeWidth: Scriptable
<number
, ScriptableScaleContext
>
文字周圍描邊的寬度。
預設值
0
# 定義於
types/index.d.ts:3074 (在新視窗開啟)
# z
• z: number
刻度圖層的 z-index。當刻度繪製在圖表區域上時很有用。值 <= 0 時繪製在資料集下方, > 0 時繪製在上方。
預設值
0