Comparison · Intermediate

Radar chart

Compares several metrics at once.

Open in playground
Use when
Products or candidates scored on 5 to 8 metrics
Avoid when
More than 3 series (they overlap and get hard to read)

Try it

11

Radar chart

Product ratings (out of 100)
  • Our app
  • Industry average
Radar chartRadar chart. 6 metrics (Speed, Stability, Design, Price, Support, Features), 2 series.
Radar chart data
SpeedOur app 86, Industry average 72
StabilityOur app 78, Industry average 74
DesignOur app 92, Industry average 68
PriceOur app 64, Industry average 71
SupportOur app 70, Industry average 66
FeaturesOur app 81, Industry average 75
Ahead on design, behind on priceIntermediate

Hover over the chart, or Tab in and use the arrow keys to move between items. The numbers are sample data.

Variants

Named looks for this chart. Each one is the example above with a few options or fields changed. The CLI (ztd-charts example radar --variant <id>) and the MCP server know the same names.

Round grid

Product ratings (out of 100)
  • Our app
  • Industry average
Sample data

Three rings

Product ratings (out of 100)
  • Our app
  • Industry average
Sample data

Code

RadarChart.tsx
import { ChartCard, RadarChart } from "ztd-charts";

const data = [
  {"metric":"Speed","product":"Our app","score":86},
  {"metric":"Stability","product":"Our app","score":78},
  {"metric":"Design","product":"Our app","score":92},
  {"metric":"Price","product":"Our app","score":64},
  {"metric":"Support","product":"Our app","score":70},
  {"metric":"Features","product":"Our app","score":81},
  // … 6 more rows
];

export function Example() {
  return (
    <ChartCard number="11" title="Radar chart" subtitle="Product ratings (out of 100)" takeaway="Ahead on design, behind on price" level="intermediate" legend={[{"label":"Our app","color":"accent"},{"label":"Industry average","color":"neutralStrong"}]} replay>
      <RadarChart
        data={data}
        axis="metric"
        value="score"
        series="product"
      />
    </ChartCard>
  );
}

Props

<RadarChart> takes these props. Rows marked Common work the same on every chart.

28 props

Prop
dataRequiredAn array of objects. Pass CSV, REST or database rows as they areobject[]
axisRequiredMetric (axis) fieldstring | (d, i) => string
valueRequiredValue fieldstring | (d, i) => number | string[]
seriesSeries fieldstring | (d, i) => string
maxValue of the outer ringnumber
levelsNumber of ringsnumberDefault 4
circularRound grid instead of polygonsbooleanDefault false
heightCommonHeight in px. Without it, each chart picks a default that fits its widthnumber
widthCommonFixed width in px. Without it, the chart fits its parentnumber
highlightCommonItem to highlight. An index, a name, an array, or "max" | "min" | "first" | "last" | "none"number | string | (number|string)[] | "max" …
formatCommonValue format. "number" | "integer" | "percent" (values are already percents: 42 → "42%") | "ratio" (0.42 → "42%") | "compact" | "currency" (KRW for Korean locales, otherwise USD; for another currency pass Intl options with currency) | "decimal" or Intl.NumberFormat options"number" | "percent" | "compact" | …
unitCommonUnit appended to values. For example "%" or "ms"string
localeCommonLocale for numbers, dates and the text a chart writes itself (tooltips, screen reader sentences). "ko" or "ko-*" switches to Korean. Falls back to the ThemeProvider localestringDefault "en-US"
animateCommonEntry and update animationbooleanDefault true
durationCommonAnimation length (ms)number
easingCommonMotion curve"spring" | "easeOut" | "easeInOut" | "linear"Default "spring"
staggerCommonDelay between items as they enter (ms)number
reducedMotionCommon"auto" follows the OS setting. true always turns motion offanyDefault "auto"
animateOnViewCommonPlay when the chart scrolls into viewbooleanDefault true
showLabelsCommonLabels drawn on the chart (values and names)booleanDefault true
tooltipCommonShow tooltips. { template: "{label} · {value} · owner {owner}" } writes them: {label}, {value}, {series} or any other column of the row. \n starts a new line, and a line with an empty value is left outtooltipDefault true
syncIdCommonCharts with the same syncId show the hovered x together (line, area, bar, candlestick). <ChartGrid sync> sets one for every chart inside itstring
ariaLabelCommonName for screen readersstring
descriptionCommonDescription for screen readers. Built from the data when omittedstring
onHoverCommonRuns when hover or keyboard focus moves to another item(e: ChartEvent | null) => void
onClickCommonRuns on click, Enter or Space(e: ChartEvent) => void
replayKeyCommonReplays the entry animation when it changesstring | number
themeCommonChanges theme tokens for this chart onlyPartial<ChartTheme>