suiss/uim · Chart

Radar Chart Interactive

A radar chart comparing up to three phone models across six scored attributes.

Radar Chart Interactive is an open-source mobile chart from suiss/uim, drawn with react-native-svg for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Radar (interactive) on iOS in light mode

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.

Installation

$ pnpm dlx @esuiss/uim@latest add radar-chart-interactive

The CLI also adds what it builds on: Card, Chart, Text, Toggle.

Manual

  1. Install the dependencies:
npx expo install cn
  1. Add the pieces it builds on: Card, Chart, Text, Toggle.

  2. Copy the source into components/charts/radar-chart-interactive.tsx:

uniwind/components/charts/radar-chart-interactive.tsx
import { cn } from "cn"
import * as React from "react"
import { View } from "react-native"
import { Card, CardContent, CardHeader } from "@/components/ui/card"
import {
  type ChartConfig,
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  PolarAngleAxis,
  PolarGrid,
  PolarRadiusAxis,
  Radar,
  RadarChart,
} from "@/components/ui/chart"
import { Text } from "@/components/ui/text"
  1. Update the import paths to match your project.

Usage

import { RadarChartInteractive } from "@/components/charts/radar-chart-interactive"
<RadarChartInteractive />

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.