OrdinalBubbles
名稱:Ordinal Bubbles(序數泡泡圖)
說明:value 索引 ([0], [1], [2]...) 資料以序數方式映射到 X 軸上,並以泡泡尺寸呈現每筆的資料大小。
params$
型別:
DeepPartial<OrdinalBubblesParams>
欄位:
名稱 說明 型別 bubbles 泡泡的設定 Object
itemLabel 資料 label
的顯示設定Object
axisLabel 圖軸 label
的顯示設定Object
rankingAmount 排名數量(顯示項目數量),預設為10,如設定為 'auto'
會在空間足夠下將所有資料顯示出來'auto' | number
params.bubbles
名稱 說明 型別 sizeAdjust 泡泡面積調整系數(數字建議在 0.1 ~ 1 之間) number
arcScaleType 用 value 計算泡泡面積的映射方式。 area
為資料映射到泡泡面積,radius
為資料映射到泡泡半徑(後者會造成面積差異更為明顯,但視覺的正確性可能會有爭議)'area' | 'radius'
valueLinearOpacity 底色透明度漸層(對應最小值到最大值) [number, number]
params.itemLabel
名稱 說明 型別 padding 間距 number
colorType 標籤顏色類別 ColorType
params.axisLabel
名稱 說明 型別 offset 圖軸標籤擺放位置 [number, number]
colorType 標籤顏色類別 ColorType
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- 預設值:
{
force: {
strength: 0.08,
velocityDecay: 0.3,
collisionSpacing: 2
},
bubbleLabel: {
colorType: 'labelContrast',
fillRate: 0.6,
lineHeight: 1,
maxLineLength: 6,
wordBreakAll: true,
},
arcScaleType: 'area'
}