MultiGridLegend
名稱:MultiGrid Legend(多組資料中的圖例)
說明:MultiGrid 資料類別使用的圖例,使用上和 Grid 資料類別中的
GridLegend
相似,同樣會對應rowLabels
,但差別在 MultiGrid 資料類別dataFormatter$
中的rowLabels
在gridList
欄位底下(會有多組)。
params$
型別:
Partial<MultiGridLegendParams>
欄位:
名稱 說明 型別 placement 擺放位置 Placement
padding 和外框的間距 number
backgroundFill 底色顏色類別 ColorType
backgroundStroke 邊框顏色類別 ColorType
gap 圖例的間隔距離 number
listRectWidth 列表圖示寬度 number
listRectHeight 列表圖示高度 number
listRectRadius 列表圖示圓角寬度 number
gridList 各別對應 Grid 索引針對各組資料設定(會覆蓋預設設定) Object[]
textColorType 文字顏色類別 ColorType
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'
- 預設值:
{
placement: 'bottom',
padding: 28,
backgroundFill: 'none',
backgroundStroke: 'none',
gap: 10,
listRectWidth: 14,
listRectHeight: 14,
listRectRadius: 0,
gridList: [
{
listRectWidth: 14,
listRectHeight: 14,
listRectRadius: 0,
}
],
textColorType: 'primary'
}