useXAxisDomain
Returns the calculated domain of an X-axis. The domain can be numerical: The type of the domain is defined by the The values of the domain are calculated based on the data and the If the chart has a Brush, the domain will be filtered to the brushed indexes if the hook is used outside a Brush context, and the full domain will be returned if the hook is used inside a Brush context.[min, max], or categorical: ['a', 'b', 'c'].type prop of the XAxis.dataKey of the axis.
Return value
CategoricalDomain | NumberDomain | undefined
The domain of the X-axis, or undefined if it cannot be calculated or if used outside a chart context.
Props
xAxisIdnumber | stringoptional
The
xAxisIdof the X-axis. Defaults to0if not provided.DEFAULT:
"defaultAxisId"