HorizontalBarChart
Bars on their side, for long labels and ranked lists.
Click a mark to pin its value
View data
| Label | Value |
|---|---|
| Search | 412 |
| Referral | 268 |
| Social | 191 |
| 143 | |
| Direct | 97 |
<HorizontalBarChart title="Signups by channel" data={data} />Usage
Data
data takes { label: string; value: number; color?: string }[]. Input arrays are never mutated and order is preserved.
- Prefer this over BarChart when labels would collide on the x axis.
Every chart also accepts the common props: description, height, color, variant, animate, formatValue and className.