Bar Chart
A column chart for comparing values across categories.
Install
npx shadcn add @clearly/bar-chartPreview
Usage
import { BarChart } from "@/components/ui/bar-chart"
<BarChart />Every Clearly component also accepts glass (subtle·medium·strong), specular and className.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Array<Record<string, unknown>> | — | Row data for the chart. |
config | ChartConfig | — | Recharts color/label config keyed by data field. |
xKey | string | "week" | Field name for the X-axis labels. |
bars | Array<{ key: string; radius?: number }> | — | Bar series; defaults to all keys in config. |