App components / Charts
Line chart
A trend over time: one line in the accent, comparisons in grey. With area it becomes an area chart with a flat tint under the accent line; smooth and on a right axis it reads as a growth curve.
MembersReact · Vue · HTMLFigma: Charts
Code
The component itself, ready to drop into your project. Switch between React, Vue and plain HTML; every version uses the same Tailwind classes on Ochre's tokens.
| Teams | Personal | |
|---|---|---|
| Jan | 4,000 | 3,000 |
| Feb | 5,000 | 3,400 |
| Mar | 4,600 | 3,200 |
| Apr | 6,000 | 4,000 |
| May | 7,200 | 4,400 |
| Jun | 6,800 | 4,200 |
| Jul | 8,400 | 5,000 |
| Aug | 9,000 | 5,600 |
| Sep | 8,600 | 5,200 |
| Oct | 10,400 | 6,000 |
| Nov | 11,000 | 6,600 |
| Dec | 12,480 | 7,000 |
- Teams
- Personal
Installation
Examples
Area chart
Revenue with a flat tint, costs dashed. Hover for the tooltip.
| Revenue | Costs | |
|---|---|---|
| Jan | £42,000 | £38,000 |
| Feb | £48,000 | £40,000 |
| Mar | £45,000 | £44,000 |
| Apr | £58,000 | £46,000 |
| May | £63,000 | £50,000 |
| Jun | £60,000 | £52,000 |
| Jul | £72,000 | £55,000 |
| Aug | £78,000 | £57,000 |
| Sep | £74,000 | £60,000 |
| Oct | £88,000 | £62,000 |
| Nov | £92,000 | £66,000 |
| Dec | £104,000 | £70,000 |
- Revenue
- Costs
Growth curve
Cumulative members, smooth, on a right axis.
| Members | |
|---|---|
| Q1 24 | 900 |
| Q2 24 | 2,300 |
| Q3 24 | 4,600 |
| Q4 24 | 8,200 |
| Q1 25 | 13,400 |
| Q2 25 | 20,800 |
| Q3 25 | 30,600 |
| Q4 25 | 43,200 |
| Q1 26 | 59,100 |
| Q2 26 | 78,500 |
| Q3 26 | 102,300 |
Motion
Built on Ochre's ease-out curves. With reduced motion switched on, everything still works, it just doesn't move.
01Each line draws itself once from left to right with a slower ease-out; the area fades in under it.
02End points pop in once the line arrives.
03New data glides every point to its new value with a slower ease-out.
04A dashed guide marks the hovered point and the tooltip follows from point to point.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | – | What the chart shows. Names it for screen readers and captions its data table. |
| categories | string[] | – | One label per point, in order. |
| series | { name; values; series?; dashed? }[] | – | The first is the accent, the rest grey. dashed for a comparison or forecast. |
| area | boolean | false | A flat tint under the first series (Area chart). |
| curve | "linear" | "smooth" | "linear" | Smooth uses a monotone curve, so it never overshoots the data. |
| axis | "left" | "right" | "left" | Which side the value axis sits on. Growth curves read better on the right. |
| labelEvery | number | auto | Label every nth point; small ticks mark the rest. |
| endPoints | boolean | !area | A point on each line's last value. |
| prefix · suffix · decimals | string · string · number | – | How values read in the tooltip. |
| height | number | 240 | Height in pixels. The width follows the container. |
Usage
Use it for
- A measure over time where the shape matters more than any single value.
- This year against last year, or actuals against a forecast (dashed).
- Cumulative growth: sign-ups, revenue to date, members.
Avoid
- More than three lines: the greys blur together. Use small multiples.
- A tint under the comparison line: only the accent gets an area.
- Smooth curves on data with sharp changes; they hide the drop.