Indicator
名稱: Indicator (指針)
說明: 適用於搭配
Pie
製作成簡易的儀表圖使用方式:透過設定
value
參數來控制指針的位置,數值範圍為 0 到圖表Data
的總合,對應到startAngle
和endAngle
之間的角度範圍。搭配Pie
使用時可以對應到Pie
上該數值的位置。
params$
型別:
Partial<IndicatorParams>
欄位:
名稱 說明 型別 startAngle 指針的起始角度 number
endAngle 指針的結束角度 number
radius 指針的半徑 number
indicatorType 指針類型 'line' | 'needle' | 'pin' | 'triangle'
size 指針的大小 number
colorType 顏色類型 ColorType
value 指針的數值 number
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- 預設值:
{
startAngle: - Math.PI / 2,
endAngle: Math.PI / 2,
radius: 0.6,
indicatorType: 'needle',
size: 10,
colorType: 'label',
value: 0,
}