Skip to content
ArcadiaDesign
A month of tokens per day, each day its own total. Point at a day, tap it or use the arrows to read it.

TSX

Bars show amounts you compare by length: a total for each day, the size of each named thing, the parts of a whole, how values spread over equal bins, how many get through each step. They always start at zero, because the bar's length is the value.

Over time, use bars when each row is a total of its own, such as tokens a day, and a line for a measure that varies between its rows. To compare named things, sort them and lay them on their side past eight names or when the names are long. Never a pie, never bars in no order, and never more than three bars to a group.

Anatomy

Band
One to a row, its bar centred in it: a quarter of the band is the gap between neighbours.
Bar
At most 48px wide, and square at both ends: a rounded end would take from the value it draws, and the end on the baseline stands the bar on its axis.
Zero and missing
A zero keeps a 1px sliver on the baseline, so the row reads as measured; a missing value draws nothing.
Groups
Up to three series side by side in each band, 2px apart, in the legend's order.
Stacks
Parts of a whole on one bar, the largest at the base; only the stack's far end is rounded.
Signed
One colour above and below the solid zero rule, which stays visible between the two signs; under zero a bar's rounded end points down.
Value labels
Caption in --text-2, beyond each bar's far end and never inside it: text on a series colour does not hold 4.5:1 in both themes.
Horizontal
Names at the inline start, end-aligned and fading at their end when long; each bar runs to the inline end with its value beyond it, and the plot draws no grid.

Examples

Comparing named things

horizontal lays the bars on their side: names at the inline start in the order given, each bar labelled at its end. The labels are the scale, so the plot draws no grid.

Errors this week by service, largest first.

Grouped

Up to three series side by side in each band, 2px apart. The legend names each one, and the card reads them all on a row.

Stacked

stacked puts the parts of a whole on one bar, the largest at the base and leading the legend. Only the stack's far end is rounded, and the card adds the total.

Signed around zero

Bars above and below the solid zero rule keep their one colour: the sign is the bar's side, never its colour. Under zero a bar rounds its lower end.

Value labels

labels writes each value beyond its bar's far end, never inside it. A series shows all its labels or none: they leave together as soon as one would crowd its neighbour.

On a narrow screen the labels leave as one, and the value axis keeps the scale.

Dense

Many rows make narrow bars, and under 8px wide a bar's end is square. Where a band would fall under 4px, bin the rows to the next coarser period before they reach the chart.

56 days, each bar square
The same days binned to weeks

A spread over equal bins

Each bar counts one bin, and its label names the bin.

A ranked share

Parts of a whole ranked by share, six and Other at most. format writes each label and the reading's value, here as a percent.

A funnel

How many get through each step: horizontal bars in step order and one colour, each labelled with its value and its share of the first step, and the drop written between each pair with between.

Four steps from a visit to a subscription.

Reading

Readout reads a band with the pointer, a finger or the keys, as on the other charts.

The pointer reads the band under it. That column stays whole in the pointer's own frame and the others set back to --chart-dim over --duration-fast. There is no crosshair and no dot: the column that stays is the mark. The axis chip names the row, and the card stands 16px from the column's edge, turning to the other side where it would leave the plot.

On a horizontal chart the reading runs down the rows. A card sits under the read row at the plot's far end, or over it near the bottom, and the keys follow the rows.

Where the card would only repeat the read bar's value label, one series whose label already prints the card's value, no card is drawn: the label steps up to --text-1 and the bar is the reading. Several series and a stack's total keep the card, as do labels in a compact form and labels a narrow plot has dropped.

Tab
Moves to the plot: the reading starts on the newest row (the top one on a horizontal chart), or on the row read last.
↑↓
Step a row as on any slider: Up to the next, or on a horizontal chart to the row above.
←→
Step a row: Right to the next, or on a horizontal chart to the row above.
HomeEnd
The first row and the last, or on a horizontal chart the bottom row and the top.
Esc
Hides the reading until the next key.

States

Zero, missing and one bar

A zero keeps a 1px sliver on the baseline; a missing value draws nothing and reads No data; one row is one bar in the middle of the plot.

Zero on two days
No count on September 9
One row

Too many rows

Where a band would fall under 4px, bin the rows to a coarser period before they reach the chart and say so in its label, per week instead of per day: Bars draws every row it is given.

A bar chart is named from its data like any other: "Tokens per day: 30 days, from 27.5M to 36.8M, up 34%". A stack adds its total, and each series of a group adds its own first and last value.

Rows that are names have no order to change along, so the name gives their count, the highest and the lowest by name, and no change: "Errors this week by service: 8 services, most Search 1,284, least Webhooks 96". noun gives the chart its word for a row; without it they are rows.

With Readout the plot is a slider over its rows, and its value text reads the row the way the card does: "Tue, Oct 6: Tokens 36,771,405". A horizontal chart is a vertical slider whose value runs from its bottom row up to its top one, so Up and Right step to the row above. Its value text uses format, so the share chart reads "Images: Share 34%".

Value labels and the funnel's drops are drawn for the eye; the name and the value text carry the same numbers, the drops as the difference between two rows.

Bars

stacked
boolean
On the other stacked bars, the largest at the base.
horizontal
boolean
Rows run down the plot, each bar labelled at its end.
labels
boolean
Each value beyond its bar's end. Always on a horizontal chart.
format
(value: number) => string
How a value reads on its label and in the reading.
between
readonly (string | null | undefined)[]
Horizontal: a line between each bar and the next.
labelrequired
string
The series' name.
valuesrequired
readonly (number | null | undefined)[]
A value per row of x; null is a gap.
colorrequired
string
The paint of the slot its entity owns: chartColor(1).