shadcn.io is not affiliated with official shadcn/ui
About
Use it when the shape matters and the scale doesn't: a quick profile on a slide, a comparison people read at a glance. One ring gives the polygon an edge to sit against without the full grid. When values need reading, go back to the plain radar's four rings.
A single hexagon outlines the space just inside the edge, with no spokes and no inner rings. The 60% filled shape and the month names are the rest.
Installation
Usage
import { ChartRadarGridCustom } from "@/components/charts/chart-radar-grid-custom";<ChartRadarGridCustom />Customize
<PolarGrid polarRadius={[90]} radialLines={false} strokeWidth={1} />draws one ring 90 pixels out and no spokes.polarRadiusis in pixels: a different chart size can leave the ring too close or too far from the shape.<Radar fillOpacity={0.6}>draws the shape, with no dots in this version.<ChartTooltipContent hideLabel />shows the value without the month.
FAQ
How do I draw only one ring?
polarRadius={[90]} on <PolarGrid> draws one ring 90 pixels from the center. Each number in the array is one ring.
Can I put rings at specific values?
List them in polarRadius, [30, 60, 90] for three rings. These are pixels, not data values, so recompute them if the chart's size changes or use <PolarRadiusAxis> ticks instead.
Why are there no spokes?
radialLines={false} on <PolarGrid> removes them. Drop the prop to bring them back.
API Reference
ChartContainer
configChartConfig
Each series by its data key: its label, an icon, and a color (or a * theme color per light and dark), read by the tooltip and legend and set * as --color-<key>.
initialDimension?{ height: number; width: number; }
The size it renders at before it's measured, so the first paint isn't * empty.
- Type
{ height: number; width: number; }- Default
INITIAL_DIMENSION
className?string
Merged with the part's classes.
ChartLegend
ChartLegendContent
<div>
hideIcon?boolean
Hides each series' icon (from config), leaving its color swatch.
- Default
false
nameKey?string
The key in each legend item's data to look its label up by in config. * Defaults to the item's dataKey.
className?string
Merged with the part's classes.
ChartStyle
<style>
configChartConfig
The chart config whose colors it writes as --color-<key> variables.
idstring
The element's id.
ChartTooltip
ChartTooltipContent
<div>
hideIndicator?boolean
Hides each item's color indicator.
- Default
false
hideLabel?boolean
Hides the tooltip's label, the hovered point's.
- Default
false
indicator?"dashed" | "dot" | "line"
The color indicator's shape: a dot, a line or dashed.
- Type
"dashed" | "dot" | "line"- Default
"dot"
labelFormatter?(label: any, payload: TooltipPayload) → React.ReactNode
Formats the tooltip's label; its value is untyped, as in recharts 3.8.
- Type
(label: any, payload: TooltipPayload) → React.ReactNode- Parameters
label– anypayload– TooltipPayload- Returns
React.ReactNode
labelKey?string
The key in the data to read the label from, looked up in config.
nameKey?string
The key in each item's data to look its name up by in config.
className?string
Merged with the part's classes.
Related
Radar Chart without Grid
Radar chartsA radar shape with no grid behind it.
Radar Chart
Radar chartsOne series on a polygon grid, six months around the center.
Radar Chart with Circle Grid
Radar chartsA radar on circular grid rings instead of polygons.
Radar Chart with Filled Grid
Radar chartsA radar on a filled polygon grid.
Area Chart
Area chartsOne series as a smooth filled curve over six months.
Multiple Radar Chart
Radar chartsTwo series overlaid on the same radar grid.