Hooks for accessing axis configuration, domains, and ticks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/recharts/recharts/llms.txt
Use this file to discover all available pages before exploring further.
useXAxis
Returns the configuration and scale information for an X-axis.The ID of the X-axis. Defaults to
0 if not provided.The axis configuration with scale, or
undefined if the axis doesn’t exist or if used outside a chart context.useYAxis
Returns the configuration and scale information for a Y-axis.The ID of the Y-axis. Defaults to
0 if not provided.The axis configuration with scale, or
undefined if the axis doesn’t exist or if used outside a chart context.useXAxisDomain
Returns the calculated domain of an X-axis. The domain can be numerical[min, max] or categorical ['a', 'b', 'c']. The type is defined by the type prop of the XAxis.
The ID of the X-axis. Defaults to
0 if not provided.The domain of the X-axis, or
undefined if it cannot be calculated or if used outside a chart context.Brush interaction
If the chart has a Brush:- Outside Brush context: returns the filtered domain (brushed indexes only)
- Inside Brush context: returns the full domain
useYAxisDomain
Returns the calculated domain of a Y-axis. The domain can be numerical[min, max] or categorical ['a', 'b', 'c']. The type is defined by the type prop of the YAxis.
The ID of the Y-axis. Defaults to
0 if not provided.The domain of the Y-axis, or
undefined if it cannot be calculated or if used outside a chart context.useXAxisTicks
Returns the ticks of an X-axis. The ticks are the same as the ones rendered by the XAxis component.The ID of the X-axis. Defaults to
0 if not provided.Array of ticks, or
undefined if the axis doesn’t exist or hasn’t been calculated yet.useYAxisTicks
Returns the ticks of a Y-axis. The ticks are the same as the ones rendered by the YAxis component.The ID of the Y-axis. Defaults to
0 if not provided.Array of ticks, or
undefined if the axis doesn’t exist or hasn’t been calculated yet.