SegmentedBar
Horizontal stacked bar showing proportions. Supports labels and legend.
Preview
Usage
import { SegmentedBar } from '@ramtt/ui'
<SegmentedBar
segments={[
{ value: 60, color: '#16A34A', label: 'Z2' },
{ value: 25, color: '#F59E0B', label: 'Z3' },
{ value: 15, color: '#EF4444', label: 'Z5' },
]}
legend
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| segments* | Segment[] | — | Bar segments |
| height | number | 8 | Bar height in pixels |
| showLabels | boolean | false | Show labels on segments |
| legend | boolean | false | Show legend below bar |