OverlappingValueAxes
名稱:Overlapping Value Axes(重疊 Value 圖軸)
說明:在相同的繪圖區域內繪製兩個 Value 圖軸(左側 Y 軸和右側 Y 軸),預設會對應前兩個 Grid 資料。和
MultiValueAxis的差別在於需搭配dataFormatter$的separateGrid要為false,才能正確繪製在相同繪圖區域中。
params$
型別:
DeepPartial<OverlappingValueAxesParams>欄位:
名稱 說明 型別 firstAxis 第一個(左側) Y 軸的設定 ObjectsecondAxis 第二個(右側) Y 軸的設定 ObjectgridIndexes 對應的 data$Grid 資料索引,可對應一組或多組 Grid 資料number[] | 'all'params.firstAxis及params.secondAxis名稱 說明 型別 labelOffset 擺放位置 [number, number]labelColorType 和外框的間距 ColorTypeaxisLineVisible 底色顏色類別 booleanaxisLineColorType 邊框顏色類別 ColorTypeticks 圖例的間隔距離 number | nulltickFormat 列表圖示寬度 string | ((text: d3.NumberValue) => string | d3.NumberValuetickLineVisible 列表圖示高度 booleantickPadding 列表圖示圓角寬度 numbertickFullLine 文字顏色類別 booleantickFullLineDasharray 文字顏色類別 stringtickColorType 文字顏色類別 ColorTypetickTextRotate 文字顏色類別 numbertickTextColorType 文字顏色類別 ColorType
詳細型別
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- 預設值:
{
firstAxis: {
labelOffset: [0, 0],
labelColorType: 'primary',
axisLineVisible: false,
axisLineColorType: 'primary',
ticks: 4,
tickFormat: ',.0f',
tickLineVisible: true,
tickPadding: 20,
tickFullLine: true,
tickFullLineDasharray: 'none',
tickColorType: 'secondary',
tickTextRotate: 0,
tickTextColorType: 'primary',
},
secondAxis: {
labelOffset: [0, 0],
labelColorType: 'primary',
axisLineVisible: false,
axisLineColorType: 'primary',
ticks: 4,
tickFormat: ',.0f',
tickLineVisible: true,
tickPadding: 20,
tickFullLine: true,
tickFullLineDasharray: 'none',
tickColorType: 'secondary',
tickTextRotate: 0,
tickTextColorType: 'primary',
},
gridIndexes: [0, 1]
}