Skip to content
mdxcn is now part of Shadcn Labs. details

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.
instead
Exact numbers on both axes are Matrix. A contribution calendar is Activity.

punchcard

[ DEPLOYS ]
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

[ TESTS ]
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>
[ PROPS ]
PropTypeDefaultDescription
titlestring—Caption drawn on the top edge of the frame.
columnsstring[] | "0 4 8 12"—Column headers, left to right.
rowsHeatRow[]—label plus a value per column. Optional when children are Markdown.
childrenMarkdown—| | 0 | 4 | 8 | | --- | --- | --- | --- | | Mon | 0 | 1 | 4 |
maxnumber—Lock the intensity scale across charts.
legendbooleantrueLess / more glyph key.
captionstring—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.
cornerstring"+"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.
classNamestring—Passed to the outer frame.