Bar chart
Compare categories with grouped or stacked bars.
Usage
Use one Bar for each numeric series and match its key to a config entry. Bars share a zero baseline.
Set stacked on Root to add bar series together. Positive and negative values stack on opposite sides of zero. Set orientation="horizontal" when category labels need more room.
Grouped series
Replay preview Full screen Code
Revenue Target
| month | Revenue | Target |
|---|---|---|
| Jan | 186 | 160 |
| Feb | 242 | 190 |
| Mar | 218 | 220 |
| Apr | 304 | 250 |
| May | 286 | 280 |
| Jun | 372 | 310 |
Horizontal stacks
Replay preview Full screen Code
Desktop Mobile
| month | Desktop | Mobile |
|---|---|---|
| Jan | 186 | 160 |
| Feb | 242 | 190 |
| Mar | 218 | 220 |
| Apr | 304 | 250 |
| May | 286 | 280 |
| Jun | 372 | 310 |
Positive and negative values
Replay preview Full screen Code
Net new accounts
| month | Net new accounts |
|---|---|
| Jan | 24 |
| Feb | -12 |
| Mar | 38 |
| Apr | -6 |
| May | 19 |
Revise a forecast
Replay preview Full screen Code
Orders
| month | Orders |
|---|---|
| April | 170 |
| May | 280 |
| June | 210 |
Continuous motion
Replay preview Full screen Code
Revenue Target
| month | Revenue | Target |
|---|---|---|
| Jan | 186 | 160 |
| Feb | 242 | 190 |
| Mar | 218 | 220 |
| Apr | 304 | 250 |
| May | 286 | 280 |
| Jun | 372 | 310 |
Data and animation states
Full screen Code
Orders
| month | Orders |
|---|---|
| April | 48 |
| May | 72 |
| June | 61 |
API reference
See the shared API reference for every part and prop.