App components / Charts
Range histogram
A distribution with a selectable range, for price and value filters: bins inside the range turn to the accent as you drag the thumbs. Daily bars with range picks days on a track under months of daily bars and sums them in a tray.
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.
£150 to £280
£150 to £280
Installation
Examples
Daily bars with range
Drag the ends of the dark selection.
Bookings2 Mar to 30 Mar
£21,198.40+12%
| Day | Bookings |
|---|---|
| 1 Jan | £380.00 |
| 2 Jan | £435.40 |
| 3 Jan | £490.80 |
| 4 Jan | £546.20 |
| 5 Jan | £601.60 |
| 6 Jan | £437.00 |
| 7 Jan | £712.40 |
| 8 Jan | £767.80 |
| 9 Jan | £413.20 |
| 10 Jan | £468.60 |
| 11 Jan | £524.00 |
| 12 Jan | £579.40 |
| 13 Jan | £414.80 |
| 14 Jan | £690.20 |
| 15 Jan | £745.60 |
| 16 Jan | £801.00 |
| 17 Jan | £446.40 |
| 18 Jan | £501.80 |
| 19 Jan | £557.20 |
| 20 Jan | £392.60 |
| 21 Jan | £668.00 |
| 22 Jan | £723.40 |
| 23 Jan | £778.80 |
| 24 Jan | £834.20 |
| 25 Jan | £479.60 |
| 26 Jan | £535.00 |
| 27 Jan | £370.40 |
| 28 Jan | £645.80 |
| 29 Jan | £701.20 |
| 30 Jan | £756.60 |
| 31 Jan | £812.00 |
| 1 Feb | £457.40 |
| 2 Feb | £512.80 |
| 3 Feb | £348.20 |
| 4 Feb | £623.60 |
| 5 Feb | £679.00 |
| 6 Feb | £734.40 |
| 7 Feb | £789.80 |
| 8 Feb | £845.20 |
| 9 Feb | £490.60 |
| 10 Feb | £326.00 |
| 11 Feb | £601.40 |
| 12 Feb | £656.80 |
| 13 Feb | £712.20 |
| 14 Feb | £767.60 |
| 15 Feb | £823.00 |
| 16 Feb | £878.40 |
| 17 Feb | £303.80 |
| 18 Feb | £579.20 |
| 19 Feb | £634.60 |
| 20 Feb | £690.00 |
| 21 Feb | £745.40 |
| 22 Feb | £800.80 |
| 23 Feb | £856.20 |
| 24 Feb | £691.60 |
| 25 Feb | £557.00 |
| 26 Feb | £612.40 |
| 27 Feb | £667.80 |
| 28 Feb | £723.20 |
| 1 Mar | £778.60 |
| 2 Mar | £834.00 |
| 3 Mar | £669.40 |
| 4 Mar | £534.80 |
| 5 Mar | £590.20 |
| 6 Mar | £645.60 |
| 7 Mar | £701.00 |
| 8 Mar | £756.40 |
| 9 Mar | £811.80 |
| 10 Mar | £647.20 |
| 11 Mar | £922.60 |
| 12 Mar | £568.00 |
| 13 Mar | £623.40 |
| 14 Mar | £678.80 |
| 15 Mar | £734.20 |
| 16 Mar | £789.60 |
| 17 Mar | £625.00 |
| 18 Mar | £900.40 |
| 19 Mar | £955.80 |
| 20 Mar | £601.20 |
| 21 Mar | £656.60 |
| 22 Mar | £712.00 |
| 23 Mar | £767.40 |
| 24 Mar | £602.80 |
| 25 Mar | £878.20 |
| 26 Mar | £933.60 |
| 27 Mar | £989.00 |
| 28 Mar | £634.40 |
| 29 Mar | £689.80 |
| 30 Mar | £745.20 |
| 31 Mar | £580.60 |
| 1 Apr | £856.00 |
| 2 Apr | £911.40 |
| 3 Apr | £966.80 |
| 4 Apr | £612.20 |
| 5 Apr | £667.60 |
| 6 Apr | £723.00 |
| 7 Apr | £558.40 |
| 8 Apr | £833.80 |
| 9 Apr | £889.20 |
| 10 Apr | £944.60 |
| 11 Apr | £1,000.00 |
| 12 Apr | £645.40 |
| 13 Apr | £700.80 |
| 14 Apr | £536.20 |
| 15 Apr | £811.60 |
| 16 Apr | £867.00 |
| 17 Apr | £922.40 |
| 18 Apr | £977.80 |
| 19 Apr | £1,033.20 |
| 20 Apr | £678.60 |
| 21 Apr | £514.00 |
| 22 Apr | £789.40 |
| 23 Apr | £844.80 |
| 24 Apr | £900.20 |
| 25 Apr | £955.60 |
| 26 Apr | £1,011.00 |
| 27 Apr | £1,066.40 |
| 28 Apr | £491.80 |
| 29 Apr | £767.20 |
| 30 Apr | £822.60 |
Motion
Built on Ochre's ease-out curves. With reduced motion switched on, everything still works, it just doesn't move.
01Bars grow in once; as the range moves, bins change colour quickly and the thumbs follow the pointer.
02The summary tray slides to stay over the selected days.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | – | What is being filtered or counted; names the thumbs for screen readers. |
| bins · min · max | number[] · number · number | – | RangeHistogram: counts per bin and the values at either end. |
| value · defaultValue · onValueChange | [number, number] | – | RangeHistogram: the range in values. DailyBarsWithRange: day indexes, from inclusive to exclusive. |
| start · values | string · number[] | – | DailyBarsWithRange: the first day (ISO) and one value per day. |
| prefix · suffix · decimals | string · string · number | – | How values read. |
Usage
Use it for
- Price, size or duration filters where the shape of the data helps people choose.
- Picking a stretch of days and seeing its total against the period before (Daily bars with range).
Avoid
- Exact numbers typed in; pair it with inputs when people know the values they want.
- Fewer than about ten bins: a plain Slider is clearer.