Examples
Radar chart Pro
Several measures of a few things, on spokes around a centre: two phones' specs, a player's skills, a team's strengths. Each row is a spoke (three or more), each series an outline. Hover, press or arrow round the spokes for every series' value on one; screen readers hear each series' strongest and weakest measure.
import { RadarChart } from '@patine-ui/pro';
Live data
Loading…
<View style={{ width: 380, gap: 8 }}> <Button size="sm" variant="outline" onPress={() => setData(roll())} style={{ alignSelf: 'flex-end' }}>Shuffle</Button> <RadarChart data={data} nameKey="skill" series={[{ key: 'pro', label: 'Phone Pro' }, { key: 'lite', label: 'Phone Lite', dashed: true }]} max={100} height={300} accessibilityLabel="Phone Pro against Phone Lite" /> </View>
Try the props
gridShapelevelsdesign<RadarChart
data={phones}
nameKey="skill"
series={[{ key: 'pro', label: 'Pro' }, { key: 'lite', label: 'Lite' }]}
/>
Example: an interview scorecard
A hiring team compares two finalists on the same five skills, scored 1 to 5 by the panel. One shape against the other shows who's strong where.
Loading…
<View style={{ width: '100%', maxWidth: 480 }}> <RadarChart data={SCORES} nameKey="skill" series={[{ key: 'amara', label: 'Amara O.' }, { key: 'jonas', label: 'Jonas W.', dashed: true }]} max={5} levels={5} height={320} accessibilityLabel="Interview scores for Amara and Jonas" /> </View>
Props
The shared chart props, and:
| Prop | Type | Default | Description |
|---|---|---|---|
nameKey | string | — | The row field naming each spoke. |
series | { key, label?, color?, dashed? }[] | — | One outline per series. |
max | number | a round number over the largest value | The outer ring. |
levels | number | 4 | Rings. |
gridShape | 'polygon' | 'circle' | 'polygon' | |
fill | boolean | true | Fill each outline. |
defaultHidden | string[] | — | Series turned off at first. |