Charts

Bar list

Who leads: the name sits on its bar, scaled to the leader.

Top car parks this month

  • Gulshan Car ParkDhaka
    ৳1284k
  • Banani Trade CentreDhaka
    ৳962k
  • GEC CircleChattogram
    ৳641k
  • Dhanmondi 27Dhaka
    ৳488k
  • ZindabazarSylhet
    ৳214k

Import#

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

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

Props#

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

<BarList>

src/components/charts/bar-list.tsx
PropTypeDefaultDescription
itemsrequiredBarListItem[]—
format(v: number) => string(v) => v.toLocaleString()
sortbooleantrueLargest first (default). Turn off when the order means something else, e.g. a time sequence.
colorstring"var(--primary-subtle)"Bar fill; a light tint keeps the label readable on top of it.
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