MultiGroupAxis
Name: Multi Group Axis
Description: Usage is the same as
GroupAxis
in the Grid data type. The label text will default to thecolumnLabels
of the first item in thegridList
array indataFormatter$
(usually, MultiGrid data uses the same X-axis labels).Usage: The axis format is set with the
gridList[].groupAxis
field indataFormatter
. For detailed API, please refer to the documentation (in most cases, if usingPreset
, you don't need to setdataFormatter
manually, more commonly used is the axis label setting).Axis label setting: Use
gridList[].groupAxis.label
indataFormatter
to set the label text, as shown below:
chart.dataFormatter$.next({
gridList: [
{
groupAxis: {
label: 'Region'
}
}
]
})
params$
Type:
Partial<GroupAxisParams>
Fields:
Name Description Type labelOffset Axis label offset [number, number]
labelColorType Axis label color type ColorType
axisLineVisible Show axis line boolean
axisLineColorType Axis line color type ColorType
ticks Number of ticks
*number
: appropriate number
*null
: auto-detect
*all
: allnumber | null | 'all'
tickFormat Tick text format
*string
: annotated withd3-format
format
*Function
: custom function returning display textstring | ((text: d3.NumberValue) => string | d3.NumberValue)
tickLineVisible Show tick line boolean
tickPadding Distance between tick and text number
tickFullLine Show tick line across the entire scene boolean
tickFullLineDasharray Set tick line dash format (used with tickFullLine
astrue
)string
tickColorType Tick color type ColorType
tickTextRotate Tick text rotation number
tickTextColorType Tick text color type ColorType
gridIndexes Corresponding data$
Grid data index, can correspond to one or more Grid datanumber[] | 'all'
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',
gridIndexes: [0]
}