bars
GraphBars
Two small histograms, before and after. Write `- before: 2 4 3 5 2`. For labels ranked by value, use Rank.
- use it
- Good for a before and after, or any two small histograms.
- instead
- A ranked list is Rank.
before / after
███ ████ ████████ ███
before
████ ███████ █████████████ ████
after
<GraphBars title="THROUGHPUT" palette="duo">
- before: 2 4 3 5 2
- **after**: 2 4 3 5 2
</GraphBars>install
command
draft to shipped
██ ████ █████████ ██
draft
edit
█████ ███████ ██████████████ ███████
shipped
<GraphBars title="DRAFT TO SHIPPED" processor="edit">
- draft: 1 2 2 3 1
- **shipped**: 3 5 4 6 5
</GraphBars>| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Caption drawn on the top edge of the frame. |
| from | BarSeries | — | Left series. values is an array of relative heights. Optional when children are Markdown. |
| children | Markdown | — | - before: 2 4 3 5 2 |
| to | BarSeries | — | Right series. Set size to lg for the larger group. |
| processor | string | — | Optional label between the two groups. |
| 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. |
| corner | string | "+" | Character at each corner of the frame. |
| frame | "box" | "corners" | "rule" | "none" | "box" | box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content. |
| className | string | — | Passed to the outer frame. |