Docs/Polar Components/PolarAngleAxis

PolarAngleAxis

PolarAngleAxis defines the angle axis for a RadarChart or PieChart, positioning categories or numeric values around the chart's center. Each tick is rendered as a label (and optionally a line) at its angle.

import { PolarAngleAxis, RadarChart, PolarGrid, Radar, PolarRadiusAxis } from "solid-recharts";

<RadarChart data={data}>
  <PolarGrid />
  <PolarAngleAxis dataKey="category" />
  <PolarRadiusAxis />
  <Radar dataKey="value" />
</RadarChart>;
RadarChart
polar-custom-axes.tsxOpen ↗
Loading source...

Props

PropTypeDefaultDescription
dataKeystring | function—Data field to use as category labels (required for most cases)
anglenumber—Fixed angle to render the axis line (used with numeric data)
angleAxisIdstring | number0Unique ID (use if multiple angle axes)
type"number" | "category"autoForce numeric or categorical scale
tickboolean | object | functiontrueRender tick labels; object for style, function to customize
tickFormatterfunction—Function to format tick labels: (value, index) => string
tickLinebooleantrueShow tick lines (short lines at each tick)
tickSizenumber8Length of tick lines (px)
axisLineboolean | objecttrueShow axis line; true = polygon/circle, false = hidden
axisLineType"polygon" | "circle""polygon"Shape of axis line
orientation"inner" | "outer""outer"Position labels inside or outside the chart
onClick, onMouseEnter, …function—Per-tick event handlers, called (tickItem, index, event)

All other recharts PolarAngleAxis props are supported; see the recharts PolarAngleAxis docs for the full matrix.

Notes

  • dataKey extracts the label for each tick from your data (e.g. dataKey="subject").
  • If dataKey is a function, it receives each data entry: dataKey={(entry) => entry.label}.
  • tickFormatter can transform labels: tickFormatter={(value) => value.toUpperCase()}.
  • axisLineType="circle" renders a circle; "polygon" renders a multi-sided shape (more common).
  • Use tick={false} to hide labels entirely.
  • Tick event handlers receive the tick item, index, and the native event.

See also