aboutsummaryrefslogtreecommitdiff
path: root/internal/cryptomarket/chart.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cryptomarket/chart.go')
-rw-r--r--internal/cryptomarket/chart.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/cryptomarket/chart.go b/internal/cryptomarket/chart.go
index c1fef29..5ea477c 100644
--- a/internal/cryptomarket/chart.go
+++ b/internal/cryptomarket/chart.go
@@ -13,7 +13,10 @@ func Chart(candles []Candle, width int, unicode bool, paint func(string, bool) s
width = max(12, min(80, width))
label := 12
count := width - label - 2
- if count < 2 || len(candles) < 2 {
+ if count < 2 {
+ return []string{"Chart too narrow; widen wrap_width."}
+ }
+ if len(candles) < 2 {
return []string{"Not enough completed daily candles."}
}
if len(candles) > count {