diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-25 09:23:19 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-25 09:23:19 +0200 |
| commit | 1279ffb8f2efba54ff005cce91ba65c149cb1ee6 (patch) | |
| tree | 102483e8d836501b3b935e0674d6608fbe9f4f1f /internal/tui/dashboard/sparkline.go | |
| parent | b3625cc67c81b4c1bd654a9fcdaf624d76306b07 (diff) | |
Improve TUI layout and increase sparkline height
Diffstat (limited to 'internal/tui/dashboard/sparkline.go')
| -rw-r--r-- | internal/tui/dashboard/sparkline.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/tui/dashboard/sparkline.go b/internal/tui/dashboard/sparkline.go index 1531ca6..9c1f2c4 100644 --- a/internal/tui/dashboard/sparkline.go +++ b/internal/tui/dashboard/sparkline.go @@ -11,8 +11,10 @@ func renderSparkline(data []float64, width int) string { samples := sampleForWidth(data, width) min, max := minMax(samples) + line := "" if min == max { - return repeatRune('▄', len(samples)) + line = repeatRune('▄', len(samples)) + return line + "\n" + line } out := make([]rune, len(samples)) @@ -28,7 +30,8 @@ func renderSparkline(data []float64, width int) string { } out[i] = sparkChars[idx] } - return string(out) + line = string(out) + return line + "\n" + line } func sampleForWidth(data []float64, width int) []float64 { |
