MultiStackedValueAxis
名稱:Multi Stacked Value Axis(多組資料中的堆疊 Value 圖軸)
說明:使用上等同於 Grid 資料類別中的
StackedValueAxis
,搭配堆疊資料的圖形(目前有MultiStackedBar
) 的 Value 圖軸(預設為 Y 軸)。
params$
型別:
Partial<MultiStackedValueAxisParams>
欄位:
名稱 說明 型別 labelOffset 擺放位置 [number, number]
labelColorType 和外框的間距 ColorType
axisLineVisible 底色顏色類別 boolean
axisLineColorType 邊框顏色類別 ColorType
ticks 圖例的間隔距離 number | null
tickFormat 列表圖示寬度 string | ((text: d3.NumberValue) => string | d3.NumberValue
tickLineVisible 列表圖示高度 boolean
tickPadding 列表圖示圓角寬度 number
tickFullLine 文字顏色類別 boolean
tickFullLineDasharray 文字顏色類別 string
tickColorType 文字顏色類別 ColorType
tickTextRotate 文字顏色類別 number
tickTextColorType 文字顏色類別 ColorType
gridIndexes 對應的 data$
Grid 資料索引,可對應一組或多組 Grid 資料number[] | 'all'
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- 預設值:
{
labelOffset: [0, 0],
labelColorType: 'primary',
axisLineVisible: false,
axisLineColorType: 'primary',
ticks: 4,
tickFormat: num => {
if (num === null || Number.isNaN(num) == true) {
return num || 0
}
var parts = num.toString().split('.')
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return parts.join('.')
},
tickLineVisible: true,
tickPadding: 20,
tickFullLine: true,
tickFullLineDasharray: 'none',
tickColorType: 'secondary',
tickTextRotate: 0,
tickTextColorType: 'primary',
gridIndexes: [0]
}