Line, area and bar charts on Recharts, in graphite and one accent with series told apart by line style, with a crosshair tooltip, a legend and a table view.
Average patrol speed · m/s
Chart line
npx shadcn add @syncrobotic/chart Also installs: recharts@^3, @syncrobotic/cn, @syncrobotic/table
Overview
Line, area and bar charts in the categorical palette, with a crosshair tooltip, a legend and a table view.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Battery · Patrol dog 7F3A · %
Chart area
Missions this week
Chart bar
Robot hours by site · this week
Chart stacked bar
Why robots stopped · last 30 days
Chart horizontal bar
Motor temperature · 7F3A · °C
Chart threshold
Robots out on patrol
Chart step line
7F3A · battery %
DAA6 · battery %
9E37 · battery %
Chart small multiples
Missions this week
No missions yet this week
Charts fill in after the first mission ends.
Chart no data
Missions per day
Chart previous period
Fleet by state · 6 robots
Chart stacked area
Patrol time against plan · min
Chart above below zero
Patterns
Ready-made uses of chart with real data and copy. Each installs as source under its own name.
Line chart
Values over time: telemetry, a measurement against its limit, this period against the last.
- One axis. Two measures of different scale are two charts.
- A legend for two series or more, and a table view beside the chart.
- A limit is a labelled dashed line in text colour, never a status colour.
Telemetry over time
Two series over time with a 1 h / 24 h switch and a table view: the default telemetry chart.
npx shadcn add @syncrobotic/line-chart-telemetry 1280px
Against a limit
One measurement against its limit: the latest value up top, the limit as a labelled dashed line, a warning only while it is over.
npx shadcn add @syncrobotic/line-chart-limit 1280px
This period against the last
This week against last week: the total and the change up top, the earlier period dashed.
npx shadcn add @syncrobotic/line-chart-compare 1280px
Area chart
A quantity over time with weight under it: battery, a running total, how the fleet splits.
- Stacked areas only when the parts add up to something real.
- Soft fill (12 %) for one series; stronger for stacks so the layers read.
Battery over a shift
One robot's battery over a shift with the return-to-dock level marked; the charge shows as the jump.
npx shadcn add @syncrobotic/area-chart-battery 1280px
Fleet by state
How the fleet splits between patrolling, charging and idle over the day: stacked step areas that add up to the fleet.
npx shadcn add @syncrobotic/area-chart-fleet-states 1280px
Progress to a target
The running total this month as an area against the plan as a dashed line, ahead or behind said in words.
npx shadcn add @syncrobotic/area-chart-cumulative 1280px
Bar chart
Counts per category: grouped, ranked, stacked, and above or below a plan.
- Bars start at zero.
- Rounded on the data end only, 2 px apart.
- Long category names: horizontal bars, sorted.
Grouped by day
Two counts side by side per day, with totals and a table view.
npx shadcn add @syncrobotic/bar-chart-missions 1280px
Ranked categories
Categories with long names, sorted, as horizontal bars with the value at each end.
npx shadcn add @syncrobotic/bar-chart-ranked 1280px
Parts of a whole
Stacked segments per category with a 2 px gap in the card colour.
npx shadcn add @syncrobotic/bar-chart-stacked 1280px
Above and below plan
Positive and negative values in one hue around a drawn zero line, the biggest gap named.
npx shadcn add @syncrobotic/bar-chart-variance 1280px
Sparkline
The shape of the last values next to a number: in lists, tiles and table cells.
- Neutral; the number or a word carries the warning.
- Rows that are compared share one scale.
Robot list with trend
Each robot row with its last 12 hours of battery as a sparkline and the value now.
npx shadcn add @syncrobotic/sparkline-robot-list 1280px
Metric tiles
Three headline numbers, each with its week as a sparkline; only a change for the worse is coloured.
npx shadcn add @syncrobotic/sparkline-metric-tiles 1280px
Table with a trend column
A table where each row's last 14 days are mini bars on one shared scale.
npx shadcn add @syncrobotic/sparkline-table 1280px
Status tracker
Histories of states as strips of cells: uptime per day, the last runs of a route, a rollout's stages.
- Normal is grey; only degraded, failed or down is coloured.
- Blue only for a stage that is running now.
- Each strip says its result in words too (99.2 % up, 18/20).
Uptime over 30 days
One cell a day per robot: grey where it ran, colour only on degraded and down days, with a tooltip per day.
npx shadcn add @syncrobotic/status-tracker-uptime 1280px
Run history
The last 20 runs of each route as a strip, newest on the right, with the pass count.
npx shadcn add @syncrobotic/status-tracker-runs 1280px
Rollout stages
A rollout as stage lanes: finished stages checked, the running one in progress, later ones waiting.
npx shadcn add @syncrobotic/status-tracker-rollout 1280px
Radial chart
One share of a whole as a ring: battery, progress to a goal, capacity.
- The number is always written in or beside the ring.
- A ring is neutral until the value is abnormal.
Battery rings
Battery per robot as rings, neutral until low or critical, the number always in the middle.
npx shadcn add @syncrobotic/radial-chart-battery 1280px
Progress to a goal
One large ring with the share of the plan done and the breakdown beside it in words.
npx shadcn add @syncrobotic/radial-chart-goal 1280px
Capacity rings
Several shares of capacity as concentric rings in series colours, each named with its value.
npx shadcn add @syncrobotic/radial-chart-capacity 1280px
Heatmap
Two categories crossed, shaded by how much: incidents by time of week, presence by zone.
- One hue, light to dark: darker always means more.
- A legend for the scale, and the extreme named in words or written in the cells.
Time of week
Days by 2-hour slots in one sequential hue, the busiest slot named, a tooltip per cell.
npx shadcn add @syncrobotic/heatmap-week-hours 1280px
Zones by time of day
Zones by time slots with the value written in every cell, so the colour only groups.
npx shadcn add @syncrobotic/heatmap-zones 1280px
Histogram
How one value is spread: battery at docking, mission length, label confidence, counted in equal bins.
- Equal-width bins that touch, on a number axis with ticks on the bin edges; counts start at zero.
- Say where an edge value goes: each bin holds its lower edge, not its upper, and the last holds the maximum (binEqualWidth).
- One neutral hue. Colour a range only when it means something people act on (battery below 15 % in warning), and name it in words with its count.
- The median as a labelled dashed line, in text colour. A mean only when the spread is symmetric.
Battery at docking
How one value is spread: battery level at docking in equal 5 % bins, the median as a labelled dashed line, bins under 15 % in warning, counts on hover and a table view. Exports binEqualWidth and median.
npx shadcn add @syncrobotic/histogram-battery 1280px
Usage rules
- Graphite and one accent: the series the reader should look at is --chart-1 (the brand indigo), the others graphite (2, 3), Other the light grey (4), a baseline or earlier period 5. Kept with the series when others are filtered out. Never a status colour as a series.
- Three series and Other at most: fold the rest into Other, highlight one and grey the rest, or split into small multiples.
- Line style follows the series order, set by the chart: solid, dashed (6 4), dotted (1.5 3.5). Pass strokeDasharray yourself only to override it.
- Filled marks (stacked bars, stacked areas) take the accent, then the mid grey (3) and Other (4): a large area in the strong grey (2) outweighs the accent, near-black in light and near-white in dark. The strong grey is for thin lines.
- No data is not zero. A missing value (null) takes the theme's
no-datautility (a hatch and outline in the field-edge colour, 3:1), "No data" in the legend and tooltip, and a dash in the table; zero is drawn as zero. - Two series or more: a legend above the plot, with each series' line style. One series: no legend; the title names it.
- Every chart with axes (line, area, bar, heatmap) has a table view (ChartTable), for exact values and for anyone who cannot tell two series apart. Sparklines, rings (radial) and status strips write their numbers in words instead.
- One y axis. Two measures on different scales are two charts.
- Lines 2 px; bars with 4 px rounded data ends and a 2 px gap in the card colour between bars and segments; a horizontal hairline grid; no axis lines.
- The chart fades in when it mounts (--motion-base); marks do not animate, because Recharts cannot use the motion tokens. Nothing moves under reduced motion.
Changelog
- 0.22.12026-11-21Compiles with noUncheckedIndexedAccess, as strict products build it; behaviour unchanged.
- 0.22.02026-11-20Line styles by series order: ChartContainer gives every Line and unstacked Area outline without its own strokeDasharray solid, dashed (6 4) or dotted (1.5 3.5) by its place in the config, opens grouped bars to a 2 px gap (stacked areas, like bars, get a square swatch and no dash), and the legend and tooltip draw each series' line (ChartSwatch). New exports chartDash, chartDashes and ChartSwatch. The palette is graphite and one accent (see the theme).
- 0.17.22026-11-19New chartNumber: negatives with a true minus sign (−) in ticks, tooltips and tables.