AsterUIDocsv1.0.2

Docs / Component reference

BarChart

Use bars when comparing separate categories. The shared baseline makes differences in size easy to see.

Bar chart example

Install

sh
npx @fierst/ui@1.0.2 add bar-chart

Registry dependencies: theme.

Exports from ./ui/bar-chart: ChartDatum, BarChart.

Download the registry source for bar-chart 1.0.2.

API contracts

ts
export interface ChartDatum {
  label: string;
  value: number;
}

export function* BarChart(
  props: {
    data: readonly ChartDatum[];
    height?: number;
    unit?: string;
    label?: string;
    class?: string;
  },
  ctx: Ctx,
)