RadarChart

Radar charts comparing series across categories, one spoke per category.

stable

Quick Preview

Listing scorecard

Ikate duplex · scored 0–100

Usage

import { RadarChart } from "@giddaa-housing/ui/radar-chart";

<RadarChart
  data={[
    { criterion: "Location", lekki: 86, yaba: 72 },
    { criterion: "Price", lekki: 58, yaba: 81 },
    { criterion: "Amenities", lekki: 90, yaba: 64 },
  ]}
  categoryKey="criterion"
  series={[
    { key: "lekki", label: "Lekki" },
    { key: "yaba", label: "Yaba" },
  ]}
  ariaLabel="Neighbourhood scores by criterion"
/>

RadarChart takes the same data, categoryKey, and series as BarChart, with one spoke per category, clockwise from twelve o'clock. A missing value makes that series' polygon skip the spoke.

Examples

Single series

Listing scorecard

Ikate duplex · scored 0–100

Multiple series

Each series gets its own palette slot and a legend entry.

Neighbourhood comparison

Average listing scores · 0–100

Circular grid, value scale, no dots

gridShape="circle", spokes={false}, valueAxis, a fixed valueDomain, points={false}, and a stronger fillOpacity.

Customized radar

Circular grid, visible value scale, no dots

Props

Prop/APITypeDefaultDescription
datareadonly T[]requiredOne row per spoke.
categoryKeystring or number field of TrequiredField naming each spoke, in angular order.
series{ key, label?, color? }[]requiredkey names a numeric field.
ariaLabelstringrequiredAccessible chart name.
size"sm" | "md" | "lg"inherited, otherwise "md"Plot height and type (RADAR_CHART_LAYOUT).
legendboolean | { align?, placement? }shown for 2+ seriesSeries legend; items toggle their series.
tooltipbooleantrueHover and keyboard tooltip.
gridbooleantrueConcentric rings at the value ticks.
gridShape"polygon" | "circle""polygon"Ring shape.
spokesbooleantrueLines from the center to each category.
valueAxisbooleanfalseValue ticks along the right-hand ray.
valueDomain[number, number]fitted from zeroFixed value extent.
valueTicksnumber[]five rounded ticksExact ticks, which also place the rings.
pointsbooleantrueResting dot at every observation.
fillOpacitynumber0.15Opacity of each series' wash.
formatValue(value: number) => stringgrouped numberValue ticks and tooltip values.
formatCategory(value: string | number) => stringStringSpoke labels and tooltip titles.
emptyMessageReactNode"No data to display"Shown when no valid values exist.
Chart host propssee Chart-height, initialWidth, ariaDescription, tooltipFooter, renderTooltipBody, callbacks, className, style.
createRadarChartDefinition(options)function-Same options plus hiddenSeries; returns an extensible TanStack definition.
RadarChartSeries, RadarChartOptions, RadarChartDatum, RadarChartDefinitiontypes-Exported for typed series and builders.

Accessibility

  • Provide a meaningful ariaLabel; focus the chart and use arrow keys to move between observations.
  • Keep the legend whenever more than one series renders.
  • Radar values are read comparatively; turn on valueAxis or keep the tooltip when exact figures matter.

On this page