StealThis .dev

Radar Chart

A multi-axis spider/radar chart rendered in SVG. Supports multiple data series, a shaded polygon overlay, axis labels, concentric grid rings, and hover tooltips per axis.

Open in Lab
vanilla-js svg react tailwind vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Features

  • Multi-series — overlay multiple datasets with distinct colors
  • Concentric rings — evenly spaced grid rings for easy reading
  • Axis labels — auto-positioned labels at each axis tip
  • Shaded polygon — filled area with semi-transparent overlay
  • Hover dots — data points highlighted on hover with tooltip

How it works

  1. N axes are distributed evenly around a circle (360°/N per axis)
  2. Each data value is normalized 0–1 and projected along its axis direction
  3. Polygon points are connected via SVG <polyline> and <polygon> for the fill
  4. Concentric rings are drawn at fractional radii steps