Sparkline
data
Sparkline: a compact inline chart showing a data trend
Terminal
$termuijs render sparkline
Installation
$ bunx termuijs add sparkline
Copies the source into src/components/sparkline/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Sparkline } from '@termuijs/widgets'ts
new Sparkline(label: string, style: Partial<Style> = {}, opts: SparklineOptions = {})API Reference
Sparkline
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | required | — |
color | Color | optional | Color of the sparkline |
showRange | boolean | optional | Show min/max labels |
marker | 'block' | 'braille' | optional | Rendering style |