ui.bar_chart
Bar chart
Compare categories at a glance: grouped, stacked or sideways, with targets drawn in and a click that runs Python.A revenue card
Pairs of (label, value) are enough. y_format takes a function when the shorthands (abbreviated, percent, currency) do not fit.Revenue
$399.8k
Grouped, against a target
One Series per group. Pin a colour on the baseline so the current period stands out, and draw the goal as a reference line.Weekly orders
Target met 2 weeks of 68,387
2026
2025
Stacked
Stacking shows the total and what it is made of.Paying workspaces by plan
1,008
Starter
Pro
Enterprise
Share of 100%
stacked_100 compares the mix of each category, whatever its size.Ticket sentiment by channel
Positive
Neutral
Negative
A horizontal ranking
Long labels read better on rows than on a slanted axis.Top pages · last 30 days
A click that runs Python
on_item_click receives the bar's label and value. The state changes on the server and the detail card follows.Revenue by region · click a bar
North America