GroupAxis
Name: Group Axis
Description: Group axis (default is X axis, label text corresponds to
columnLabelsindataFormatter$)Usage: The axis format will be set with the
groupAxisfield indataFormatter. For detailed API, please refer to the documentation (However, in most cases, if you are usingPreset, you do not need to setdataFormatteryourself. More commonly used is the axis label setting)Axis label setting: Use
dataFormatter'sgroupAxis.labelto set the label text, as shown below:
chart.dataFormatter$.next({
groupAxis: {
label: 'Region'
}
})
params$
Type:
Partial<GroupAxisParams>Fields:
Name Description Type labelOffset Axis label offset [number, number]labelColorType Axis label color type ColorTypeaxisLineVisible Show axis line booleanaxisLineColorType Axis line color type ColorTypeticks Number of ticks
*number: appropriate number
*null: auto-detect
*all: allnumber | null | 'all'tickFormat Tick text format
*string: annotated withd3-formatformat
*Function: custom function returning display textstring | ((text: d3.NumberValue) => string | d3.NumberValue)tickLineVisible Show tick line booleantickPadding Distance between tick and text numbertickFullLine Show tick line across the entire scene booleantickFullLineDasharray Set tick line dash format (used with tickFullLineastrue)stringtickColorType Tick color type ColorTypetickTextRotate Tick text rotation numbertickTextColorType Tick text color type ColorType
Detailed Types
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- Default values:
{
labelOffset: [0, 0],
labelColorType: 'primary',
axisLineVisible: true,
axisLineColorType: 'primary',
ticks: 'all',
tickFormat: text => text,
tickLineVisible: true,
tickPadding: 20,
tickFullLine: false,
tickFullLineDasharray: 'none',
tickColorType: 'secondary',
tickTextRotate: 0,
tickTextColorType: 'primary',
}