Components
BucketBarChart
This example is composed with Storybook args. Open the interactive workbench to change its props and inspect the generated API controls.
Import
import { BucketBarChart } from '@simal/ui/nativewindui';Props
| Prop | Values | Default | Description |
|---|---|---|---|
buckets | — | [] | One entry per bar: { key, label, value }. key is identity, label is what renders. |
maxValue | — | — | Fixes the scale. Without it bars are relative to the largest bucket, so a chart with one dominant value looks different from the same data with a cap. |
Examples
Fixed Scale
Bars scale against maxValue when given, not against the largest bucket.
Single Bucket
<BucketBarChart
buckets={[{ key: 'a', label: 'Option A', value: 88 }]}
/>