Skip to main content
Ranks categories by one metric. Each row has its rank, its name, a bar and the value, so long names stay readable and the order is the point.
The preview above is the live component gallery. Open it full size to switch between desktop and phone widths.

Options

Use a pie when a few categories are parts of one whole, and a bar chart to compare several metrics or split by a second column.

Examples

The slowest first

Behavior

  • Each row is the metric over that category’s rows, recomputed in SQL, so ratios and distinct counts are right per row.
  • A category is listed when at least one of its rows in the window passes the metric’s own filters. With a filtered metric such as refunded orders, a country without a refunded order is left out of the list and out of “top 10 of 24”. A category whose kept rows add up to 0 stays. A ratio lists a category when its numerator or its denominator keeps a row there.
  • Ties share a rank (1, 2, 2, 4). Categories with no value come last, unranked. A null category is “(empty)”.
  • With limit the subtitle says “top 10 of 24”, or “bottom” with asc.
  • Bars scale to the largest absolute value. A negative value draws a lighter bar and keeps its sign.
  • Long names wrap instead of being cut. The list grows with its rows instead of scrolling.
  • The same list sits beside a map.

Checks

hatchmark explain <code> explains a check and how to fix it.