Renders the angle axis in a polar chart. The PolarAngleAxis component displays the angular axis, typically showing category labels around the perimeter of the chart.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.
Usage
Props
Data
The key of data displayed on this axis.Can be a string, number, function, or array path.
The name of the data displayed on this axis.
Axis configuration
The id of this angle axis.Used to reference this axis from other components.
The type of axis.
category: Treats data as distinct values. Each value is equidistant from its neighbors.number: Treats data as continuous range. Closer values are placed closer together.auto: Type is inferred based on the chart layout.
The domain of the axis when type is ‘number’.Examples:
['dataMin', 'dataMax']: Auto-calculated from data[0, 'dataMax']: Fixed minimum, auto maximum['auto', 'auto']: Calculated with nice ticks[0, 100]: Fixed range[(dataMin) => dataMin - 10, (dataMax) => dataMax + 10]: Function-based
The scale function for mapping data values to coordinates.Can be ‘auto’, a d3 scale type string, or a custom scale definition.
Position (standalone mode)
These props are only used when rendered outside a chart context.The x-coordinate of the center.
The y-coordinate of the center.
The outer radius of the axis circle.
Ticks
Controls how individual tick labels are rendered.Options:
false: No tick labelstrue: Default tick labelsobject: Props merged with calculated tick propsReactElement: Custom tick elementfunction: Render function for custom ticks
Custom array of tick values and angles.If specified, overrides automatic tick generation.
The number of ticks to display.Not used when type is ‘category’.
Function to format tick values.Signature:
(value: any, index: number) => stringThe length of tick lines, in pixels.
Controls how Recharts calculates “nice” tick values.Options: ‘none’, ‘auto’, ‘adaptive’, ‘snap125’
Axis line
Controls the axis line element.Options:
false: No axis linetrue: Default axis lineobject: Props for the SVG line element
axisLineType to change the shape.The shape of the axis line.
polygon: Draws a polygon connecting tick positionscircle: Draws a circle at the axis radius
Appearance
The orientation of axis text and ticks.
outer: Ticks point outward, labels outside the chartinner: Ticks point inward, labels inside the chart
The stroke color of the axis line and ticks.
The stroke width of the axis line and ticks.
Behavior
Whether to allow decimal values in ticks.
Whether to allow duplicated categories when type is ‘category’.
If true, reverses the direction of the axis.
Display
The z-index of the axis.Higher values render on top of lower values.
Interaction
Event handler for click events on axis ticks.Signature:
(data: TickItem, index: number, e: React.MouseEvent) => voidEvent handler for mouse enter events on ticks.
Event handler for mouse leave events on ticks.
Other
CSS class name for the axis element.