suiss/ui ยท Chart
Radar Chart
Ten radar charts for comparing several measures at once, with dots, circular or filled grids, legends, outlines and multiple series.
Radar Chart is an open-source chart from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Radar charts compare one or two subjects across several measures on axes that share a center. Use the default for a single profile, add a second series to compare two periods or products, and choose between polygonal, circular, filled or no grid lines to set how much structure the chart shows. The radius axis variant adds a visible value scale.
Each chart is built on the Chart and Card components.
Every variant below is its own registry item, so you can add only the ones you need. Each one renders the same design on React, React Native, SwiftUI and Jetpack Compose.
Default
A single filled radar shape showing this month's scores across six training skills.
One series drawn as a filled shape across six axes on a polygon grid. Use it to show the profile of a single item across several comparable scores, such as skills or product ratings.
Replace chartData with one record per axis, and set dataKey on PolarAngleAxis to the axis name field and on Radar to your value field. Rename the series in chartConfig to set its label and color. The radius adapts to the largest value, so two charts with different data aren't directly comparable; the radius-axis variant uses a fixed range. Radar charts read best with five to eight axes.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
Web preview
The basic RadarChart: a polygon PolarGrid, an angle axis for each skill and one filled Radar series. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Only thisMonth is drawn. Pressing the chart shows a tooltip.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Apply the Compose compiler plugin, enable Compose, set
compileSdkto 37 or higher andminSdkto 24 or higher, and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Dots
A single radar shape with a solid dot marking the value on every axis.
A single radar shape with a solid dot at the value on every axis. The dots make individual scores easier to locate than on the plain filled shape.
Replace chartData, set the axis and value keys, and rename the series in chartConfig. The dot prop on Radar sets the marker size; set it to false for the plain shape.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart with one lightly filled Radar series and a dot on each point. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Only thisMonth is drawn. Pressing the chart shows a tooltip.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Grid Circle
A single radar shape drawn over circular rings instead of polygonal grid lines.
The default radar shape drawn over concentric circles instead of polygon rings. Circles look softer and avoid suggesting straight edges between axes that the data doesn't have.
Replace chartData, set the axis and value keys, and rename the series in chartConfig. Remove gridType from PolarGrid to go back to polygon rings.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart whose PolarGrid uses gridType="circle", with one filled Radar series. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Only thisMonth is drawn. Pressing the chart shows a tooltip.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Grid Filled
A borderless radar shape over shaded circular rings separated by card-colored lines.
A borderless radar shape over shaded circular bands, separated by lines in the card's background color (muted). Choose it for a quieter, more graphic look where the grid reads as tinted rings rather than lines.
Replace chartData, set the axis and value keys, and rename the series in chartConfig. The fill and opacity on PolarGrid set the band shading, and the opacity on Radar the strength of the shape. The gaps between bands use the card's background color, so place the chart on that surface or change the grid stroke to match.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart whose circular PolarGrid is filled with the secondary color and separated by strokes in the card color. The single Radar series has no stroke. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Grid None
A single solid radar shape with no grid and no outline, leaving only the shape and axis labels.
A solid radar shape with no grid and no outline, leaving only the shape and the axis labels. Use it as a compact, decorative profile where exact values come from the tooltip.
Replace chartData, set the axis and value keys, and rename the series in chartConfig. fillOpacity on Radar sets the shape's intensity. With no grid, readers can't estimate values from the chart, so keep the tooltip or show the numbers elsewhere.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart without a PolarGrid, so only the angle axis labels and one filled Radar shape remain. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Interactive
A phone model comparison where toggle chips show up to three models, which grow in and out of the radar.
A phone comparison where chips select up to three models; their shapes grow into or shrink out of the radar, and side cards show each model's overall score or the score on the hovered axis. Use it as a template for comparing a handful of items across shared criteria.
Replace AXES with your criteria and SCORES with one array per item in the same order, and add each item's label and color to chartConfig. MAX_SELECTED sets how many items show at once and the selected state which ones start visible; selecting past the limit drops the oldest, and the last one can't be turned off. The scale is fixed from 0 to 100, so rescale your scores or change the radius axis domain. The score cards are a live region, and the grow animation is skipped when reduced motion is preferred.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A Card with a row of Toggle chips, a RadarChart and a summary card per model. Scores live in SCORES, one array per model, in the order of AXES. Up to three models can be selected; picking a fourth drops the oldest, and the last one cannot be cleared. Pressing an axis bolds its label and switches each summary from the overall average to that axis score; a tooltip lists the values. Each radar sets isAnimationActive={false} and draws without the enter animation.
Replace AXES and SCORES with your attributes and items, and add a matching entry to chartConfig and SWATCH for each. Change MAX_SELECTED to allow more series. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Legend
Two overlapping radar shapes with a legend beneath that names each series.
Two overlapping radar shapes with a legend underneath naming each series. Pick it over the plain multiple-series chart when readers need to know which shape is which without hovering.
Replace chartData and rename the series keys in the data, both Radar elements and chartConfig; the legend reads labels and colors from the config. The series declared last is drawn on top.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart with two filled Radar series and a ChartLegend that names them from chartConfig. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip with both values.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Lines Only
Two radar outlines with no fill, comparing this month and last month by stroke alone.
Two radar outlines without fill, comparing this month with last month by stroke alone. Use it when filled shapes would hide each other, especially with more than two series.
Replace chartData and rename the series keys in the data, the Radar elements and chartConfig, and add a Radar for each extra series. Without fill or legend, color is the only cue for which line is which, so add a legend or pick strongly contrasting colors.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart with two Radar series drawn with fillOpacity={0}, so only the outlines show. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip with both values.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Multiple
Two overlapping radar shapes comparing this month with last month.
Two semi-transparent radar shapes layered on the same grid, comparing this month with last month. Use it for a before-and-after or two-item comparison across the same axes.
Replace chartData and rename the series keys in the data, both Radar elements and chartConfig. Put the reference series first so the current one is drawn on top. There is no legend, so series names appear only in the tooltip; use the legend variant if that's not enough.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart with two lightly filled Radar series drawn over a polygon grid. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip with both values.
Replace chartData with your records, set PolarAngleAxis dataKey to your axis field, and rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.
Usage
Radius Axis
A single radar shape with a visible 0 to 100 value scale along the vertical axis.
A single radar shape with a 0 to 100 scale printed along the vertical axis. Choose it when readers need to estimate values, or when several radar charts must share the same scale.
Replace chartData, set the axis and value keys, and rename the series in chartConfig. Set domain on PolarRadiusAxis to your score range, tickCount for the number of labels and its angle to move the scale. A fixed domain keeps shapes comparable across charts as long as your scores stay inside it.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Follow the manual steps under Default and copy this variant's source instead.
Usage
Web preview
A RadarChart that adds a PolarRadiusAxis with five ticks over a fixed 0 to 100 domain, plus one filled Radar series. chartData has one record per axis (skill) with thisMonth and lastMonth scores. Pressing the chart shows a tooltip.
Replace chartData with your records and set the PolarRadiusAxis domain to your value range. Rename the series in chartConfig. The component takes no props.
Installation
Follow the manual steps under Default and copy this variant's source instead.