XYAux
Name: X And Y Axes Auxiliary Line (X and Y Axes Auxiliary Line)
Description: X, Y axis auxiliary lines used for MultiValue data type
params$
Type:
DeepPartial<XYAuxParams>Fields:
Name Description Type xAxis X axis settings ObjectyAxis Y axis settings Objectparams.xAxis,params.yAxisFields:
Name Description Type showLine Show auxiliary line booleanshowLabel Show auxiliary label booleanlineDashArray Line attribute dash-array stringlineColorType Line color type ColorTypelabelColorType Label color type ColorTypelabelTextColorType Label text color type ColorTypelabelTextFormat Label text function string | ((text: any) => string)labelPadding Label padding number
Detailed Types
type ColorType = 'none' | 'label' | 'labelContrast' | 'primary' | 'secondary' | 'background'
- Default value:
{
xAxis: {
showLine: true,
showLabel: true,
lineDashArray: '3, 3',
lineColorType: 'primary',
labelColorType: 'primary',
labelTextColorType: 'background',
labelTextFormat: num => {
if (num === null || Number.isNaN(num) == true) {
return num || 0
}
const absNum = Math.abs(num)
if (absNum > 0 && absNum < 1) {
const strNum = num.toString()
const match = strNum.match(/0\.(0*)([1-9])/)
if (match) {
const precision = match[1].length + 1
return num.toFixed(precision)
}
return num.toString()
}
const parts = num.toString().split('.')
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return parts[0]
},
labelPadding: 20,
},
yAxis: {
showLine: true,
showLabel: true,
lineDashArray: '3, 3',
lineColorType: 'primary',
labelColorType: 'primary',
labelTextColorType: 'background',
labelTextFormat: num => {
if (num === null || Number.isNaN(num) == true) {
return num || 0
}
const absNum = Math.abs(num)
if (absNum > 0 && absNum < 1) {
const strNum = num.toString()
const match = strNum.match(/0\.(0*)([1-9])/)
if (match) {
const precision = match[1].length + 1
return num.toFixed(precision)
}
return num.toString()
}
const parts = num.toString().split('.')
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
return parts[0]
},
labelPadding: 20,
}
}