Revenue Chart Card
A year of monthly revenue drawn against the year before: the current year as a soft area and solid line, last year as a dashed line behind it, so the gap between them is the story. 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 as the stat cards and the Pro chart cards, so it drops into any dashboard row. Free, built on Recharts.
Revenue
₹152,314
+16%₹131,304 last year
- This year
- Last year
| Period | This year | Last year |
|---|---|---|
| Jan | 9840 | 8210 |
| Feb | 10120 | 8460 |
| Mar | 11380 | 9950 |
| Apr | 10960 | 10240 |
| May | 12210 | 10880 |
| Jun | 12740 | 11020 |
| Jul | 13980 | 11760 |
| Aug | 13120 | 12030 |
| Sep | 14210 | 12190 |
| Oct | 14690 | 12480 |
| Nov | 14360 | 12160 |
| Dec | 14703.92 | 11924 |
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="revenue-chart-card"/>;}Your own numbers
Provide current and previous values in data. Totals, the percentage change and hover details all follow those numbers, avoiding a separate headline calculation. Set title for the resting header text.
'use client';
import {SourceChartPreview} from '@helios-ui/react';
import '@helios-ui/react/styles.css';
export default function Example(){return <SourceChartPreview id="revenue-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 default card is 344px tall and grows to fill its share of a row. Pair it with Orders or another card to create the dashboard composition 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="revenue-chart-card" example="in-row"/>;}