heatmap
GraphHeatmap
A labeled grid shaded by intensity. Write a Markdown table. For exact numbers use Matrix, and for a contribution calendar use Activity.
- use it
- Good for a labeled grid of intensities.
punchcard
048121620
- Mon
- Tue
- Wed
- Thu
- Fri
- Sat
- Sun
LessMore
<GraphHeatmap title="DEPLOYS" palette="duo">
| | 0 | 4 | 8 | 12 | 16 | 20 |
| --- | --- | --- | --- | --- | --- | --- |
| Mon | 0 | 1 | 4 | 8 | 6 | 1 |
| Tue | 0 | 0 | 5 | 9 | 4 | 2 |
| Wed | 1 | 0 | 6 | 12 | 5 | 1 |
| Thu | 0 | 2 | 4 | 7 | 8 | 3 |
| Fri | 0 | 1 | 3 | 5 | 2 | 0 |
| Sat | 0 | 0 | 1 | 0 | 0 | 0 |
| Sun | 0 | 0 | 0 | 1 | 0 | 0 |
</GraphHeatmap>install
command
coverage
abcd
- auth
- billing
- docs
<GraphHeatmap title="TESTS" max={10} legend={false}>
| | a | b | c | d |
| --- | --- | --- | --- | --- |
| auth | 10 | 8 | 4 | 2 |
| billing | 6 | 10 | 7 | 1 |
| docs | 2 | 3 | 9 | 8 |
</GraphHeatmap>| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | — | Caption drawn on the top edge of the frame. |
| columns | string[] | "0 4 8 12" | — | Column headers, left to right. |
| rows | HeatRow[] | — | label plus a value per column. Optional when children are Markdown. |
| children | Markdown | — | | | 0 | 4 | 8 | | --- | --- | --- | --- | | Mon | 0 | 1 | 4 | |
| max | number | — | Lock the intensity scale across charts. |
| legend | boolean | true | Less / more glyph key. |
| caption | string | — | Optional note under the matrix. |
| 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. |