tui

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SparklineLevels       = 8  // number of vertical levels
	SparklineMaxLevel     = 7  // max index (SparklineLevels - 1)
	SparklineBuckets      = 48 // 4 hours at 5-minute intervals
	SparklineWindow       = 4 * time.Hour
	SparklineBucketsPerHr = 12 // 60 min / 5 min intervals
)

Sparkline configuration defaults.

Variables

View Source
var SparklineChars = []rune{'▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'}

SparklineChars are Unicode block characters for sparkline rendering (8 levels).

Functions

func RenderSparkline

func RenderSparkline(timestamps []time.Time, buckets int, window time.Duration) string

RenderSparkline creates a sparkline visualization from event timestamps. Buckets events into time slots and shows activity intensity. Returns the raw sparkline string (caller applies styling).

func RenderSparklineTimeMarkers

func RenderSparklineTimeMarkers() string

RenderSparklineTimeMarkers renders time markers aligned below a 4h sparkline. Returns the raw marker string (caller applies styling).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL