Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

A radar chart with a grid and circle fill (no lines) for React

Round radar rings with the spokes removed, a filled desktop shape, and a dot on each month.

The grid is round rings only. Spokes are off. The desktop shape is filled, and a dot marks each month.

Use it when the overall profile matters more than reading each axis. Add the spokes back if a month needs a line to the center. For the values, use a Table. In React, Base UI does not hide the spokes. You turn them off, and you pass the data.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Chart anatomy: container, grid, axis, bar, tooltip, legend

Usage

<div className="w-full max-w-xl rounded-md border bg-background p-4">
  <ChartContainer
    className="mx-auto aspect-square max-h-[250px]"
    config={chartConfig}
  >
    <RadarChart data={chartData}>
      <ChartTooltip
        content={<ChartTooltipContent hideLabel />}
        cursor={false}
      />
      <PolarGrid gridType="circle" radialLines={false} />
      <PolarAngleAxis dataKey="month" />
      <Radar
        dataKey="desktop"
        dot={{
          fillOpacity: 1,
          r: 4,
        }}
        fill="var(--color-desktop)"
        fillOpacity={0.6}
      />
    </RadarChart>
  </ChartContainer>
</div>

FAQ

How is the grid drawn as circles?

PolarGrid sets gridType to circle and radialLines to false. The rings are circles, and the spokes from the center are off.

How are the dots on the shape drawn?

Radar sets dot to { r: 4, fillOpacity: 1 }. The series uses dataKey desktop, fill var(--color-desktop), and fillOpacity 0.6. The dot is opaque. The polygon fill is 0.6.

Where do the month names come from?

PolarAngleAxis sets dataKey to month, so the rim prints January through June. There is no tick formatter in this file.

Where does the fill color come from?

config maps desktop to var(--chart-1) and the label Desktop. ChartContainer writes --color-desktop, which Radar uses for fill.

What does the tooltip show?

ChartTooltipContent sets hideLabel, and cursor is false. The row is named Desktop from config, with that month's desktop value.

Which values are plotted?

desktop is 186, 305, 237, 203, 209, and 214 for January through June. April in this file is 203. ChartContainer is mx-auto aspect-square max-h-[250px].

API Reference

Chart

Sets config={chartConfig} and hideLabel. The rest is on the Chart page.