Charts

Heatmap

Busy hours by weekday — one hue, light to dark, with the scale printed.

Entries by hour

0003060912151821SatSunMonTueWedThuFri
0 cars89 cars

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { ChartCard, Heatmap } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Heatmap>

src/components/charts/heatmap.tsx
PropTypeDefaultDescription
rowsrequiredstring[]—Row labels, top to bottom (e.g. weekdays).
columnsrequiredstring[]—Column labels, left to right (e.g. hours).
valuesrequirednumber[][]—values[row][column]
format(v: number) => string(v) => String(v)
maxnumber—Top of the scale; defaults to the largest value.
showColumnEverynumber1Label every nth column so 24 hours stay readable.
classNamestring—

<ChartCard>

src/components/charts/chart-card.tsx
PropTypeDefaultDescription
titlerequiredstring—
descriptionstring—
seriesSeriesMeta[]—
actionReact.ReactNode—
childrenrequiredReact.ReactNode—
classNamestring—
heightnumber240

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui