TreeMap
名稱:Tree Map(矩形樹狀圖表)
說明:矩形樹狀圖表
params$
型別:
Partial<TreeMapParams>
欄位:
名稱 說明 型別 paddingInner 矩形內部間距 number
paddingOuter 和外框的間距 number
labelColorType 標籤文字顏色類別 ColorType
squarifyRatio 矩形長邊比例 number
sort 資料排序函式 (a: ComputedDataTree, b: ComputedDataTree) => boolean
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- 預設值:
{
paddingInner: 2,
paddingOuter: 2,
labelColorType: 'labelContrast',
squarifyRatio: 1.618034, // 黃金比例
sort: (a, b) => b.value - a.value
}