Orders Chart Card
A year of monthly orders as bars, this year beside last year for every month, so the comparison is read bar to bar. The headline counts up to the total with a delta chip, and hovering a month swaps it for that month's figure and what it was a year earlier. The same frame and header as the Revenue Chart Card, so the two share a row. Free, built on Recharts.
Orders
25,162
+20%20,968 last year
- This year
- Last year
| Period | This year | Last year |
|---|---|---|
| Jan | 1680 | 1510 |
| Feb | 1740 | 1480 |
| Mar | 1920 | 1650 |
| Apr | 1850 | 1620 |
| May | 2040 | 1710 |
| Jun | 2110 | 1760 |
| Jul | 2290 | 1840 |
| Aug | 2180 | 1890 |
| Sep | 2320 | 1930 |
| Oct | 2410 | 1970 |
| Nov | 2280 | 1810 |
| Dec | 2342 | 1798 |
Installation
Download the React source package, install its dependencies, and import the component with its shared styles.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="orders-chart-card"/>;}Your own numbers
Supply data with the current and previous value for each period. The card calculates totals, change and hover details from those values. Set title to choose the resting header label.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="orders-chart-card" data={[{name:'Jan',value:120,previous:100},{name:'Feb',value:180,previous:150},{name:'Mar',value:160,previous:140}]}/>;}In a row
The two free comparison cards share the available row width and use a default height of 344px. Place them side by side for the dashboard arrangement shown in the chat starter.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="orders-chart-card" example="in-row"/>;}