Components
Timeseries Card
Card-wrapped daily time-series chart (area or bar) with a hidden Y axis, dashed grid, brand-token colour, styled tooltip and an empty state.
Timeseries Card
A card with a title, optional description and a daily time-series chart built on Recharts. Dates in YYYY-MM-DD form are shown as M/D on the X axis; other strings pass through unchanged. When data is empty, the card shows emptyNote instead of a chart.
Installation
Terminal
$npx shadcn@latest add @vandoko/timeseries-cardUsage
import { TimeseriesCard } from "@/components/timeseries-card";
const data = [
{ date: "2026-11-10", value: 120 },
{ date: "2026-11-11", value: 184 },
{ date: "2026-11-12", value: 152 },
];
export default function Page() {
return (
<TimeseriesCard
title="Sessions"
description="Last 3 days"
data={data}
valueLabel="Sessions"
/>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Card title |
description | string | — | Text under the title |
data | { date: string; value: number }[] | — | One point per day |
variant | "area" | "bar" | "area" | Chart type |
valueLabel | string | — | Label for the value in the tooltip |
colorVar | string | "var(--chart-1)" | Brand chart token for the series colour |
emptyNote | string | — | Shown when data is empty |
className | string | — | Extra classes on the card |