Skip to content

Rank

GraphRank

A list of labels with a bar of characters and a number on the right.

Good for traffic, coverage, or anything you'd sort highest first. Two histograms side by side is Bars. A table of numbers is Table.

Command

pnpm dlx shadcn@latest add <origin>/r/graph-rank.json

Routes

Pages ordered by visits. The longest bar is the busiest.

[ ROUTES ]
  1. /docs12,400
  2. /install4,100
  3. /plot860
  4. /rank420

Coverage

Every bar uses the same scale, so the percents line up.

[ COVERAGE ]
  1. frame100%
  2. plot82%
  3. invoice41%

Props

PropTypeDefaultDescription
titlestringCaption drawn on the top edge of the frame.
itemsRankItem[]Each row is a label, a number, and an optional display string for the right column.
maxnumberScale for the bars. Defaults to the largest value.
ticksnumber20How many character slots each bar uses.
glyphs"shade" | "ascii" | "hash" | "bar" | string[]"shade"Character set. shade is ·░▒▓█. ascii is .- =#@. Pass a preset or your own characters.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
classNamestringPassed to the outer frame.