Charts

Trend chart

One y-axis, always. A legend above one series.

Entries this week

  • Cars
  • Motorcycles

Import#

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

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

Props#

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

<TrendChart>

src/components/charts/trend-chart.tsx
PropTypeDefaultDescription
datarequiredRecord<string, string | number>[]—
xKeyrequiredstring—
seriesrequiredTrendSeries[]—
format(v: number) => string(v) => String(v)
stackedboolean—

<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