HeatMap
data
HeatMap: 2D matrix displayed with character-density shading
Terminal
$termuijs render heat-map
Installation
$ bunx termuijs add heat-map
Copies the source into src/components/heat-map/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { HeatMap } from '@termuijs/widgets'ts
new HeatMap(matrix: number[][], style: Partial<Style> = {}, opts: HeatMapOptions = {})API Reference
HeatMap
| Prop | Type | Required | Description |
|---|---|---|---|
matrix | number[][] | required | — |
highColor | Color | optional | Color for maximum value cells |
lowColor | Color | optional | Color for minimum value cells |
rowLabels | string[] | optional | Row labels (left side) |
colLabels | string[] | optional | Column labels (top) |