Charts

Line chart

This week against last week (dashed) and a target line. One y-axis.

Revenue per day

৳ thousands

  • This week
  • Last week

Import#

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

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

Props#

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

<LineChart>

src/components/charts/line-chart.tsx
PropTypeDefaultDescription
datarequiredRecord<string, string | number>[]—
xKeyrequiredstring—
seriesrequiredLineSeries[]—
format(v: number) => string(v) => String(v)
target{ value: number; label: string }—
curvedbooleantrue

<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