Docs/Polar Components/PolarRadiusAxis

PolarRadiusAxis

PolarRadiusAxis defines the numeric axis for a RadarChart, scaling data values to distances from the chart's center. Ticks are rendered as labels (and optionally a line) along the specified angle.

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

<RadarChart data={data}>
  <PolarGrid />
  <PolarAngleAxis dataKey="category" />
  <PolarRadiusAxis angle={30} domain={[0, 150]} />
  <Radar dataKey="value" />
</RadarChart>;
RadarChart
polar-custom-axes.tsxOpen ↗
Loading source...

Props

PropTypeDefaultDescription
anglenumber0Angle (degrees) along which to render the axis line and ticks
radiusAxisIdstring | number0Unique ID (use if multiple radius axes)
domain[min, max]autoFixed numeric range; auto-scales if omitted
tickCountnumber5Target number of ticks (approximate)
tickboolean | object | functiontrueRender tick labels; object for style, function to customize
tickFormatterfunction—Function to format tick labels: (value, index) => string
axisLinebooleantrueShow axis line along the angle
labelobject | function—Axis title; object for style, function to render
orientation"left" | "right" | "middle""right"Tick label position relative to the axis line
type"number" | "category""number"Axis type (number is typical)
onClick, onMouseEnter, …function—Per-tick event handlers, called (tickItem, index, event)

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

Notes

  • angle controls where the axis line and labels appear (0° = 3 o'clock, clockwise).
  • domain={[0, 150]} fixes the value range; omit for automatic scaling based on data.
  • tickCount is approximate; the algorithm may use more or fewer ticks for nice numbers.
  • tickFormatter transforms values: tickFormatter={(value) => value + " units"}.
  • orientation="right" places labels to the right of the axis line; "left" mirrors it; "middle" centers them.
  • Tick event handlers receive the tick item, index, and the native event.
  • label can be a function to render custom titles: label={() => <text>Score</text>}.

See also