diff --git a/cmd/clitest/index.html b/cmd/clitest/index.html
index c815032..cbe25a2 100644
--- a/cmd/clitest/index.html
+++ b/cmd/clitest/index.html
@@ -75,7 +75,7 @@
-
+
diff --git a/cmd/clitest/main.go b/cmd/clitest/main.go
index 6e62906..ad764a0 100644
--- a/cmd/clitest/main.go
+++ b/cmd/clitest/main.go
@@ -192,6 +192,7 @@ func main() {
names = append(names, name)
}
}
+ instant := map[string]string{}
toChart := func(cumulative bool, display string, reg ledger.Register) Chart {
nameCurrencyDateValue := map[string]map[ledger.Currency]map[string]float64{}
for date, balances := range reg {
@@ -229,12 +230,14 @@ func main() {
}
series[i] = int(lastValue)
}
+ key := fmt.Sprintf("%s (%s)", name, currency)
for i := range dates {
if !(reg.Dates()[0] <= dates[i] && dates[i] <= reg.Dates()[len(reg.Dates())-1]) {
series[i] = 0
+ } else {
+ instant[key] = fmt.Sprintf("@%s %v", dates[i], series[i])
}
}
- key := fmt.Sprintf("%s (%s)", name, currency)
if slices.Min(series) != 0 || slices.Max(series) != 0 {
chart.AddY(key, series)
}
@@ -262,12 +265,14 @@ func main() {
break
}
}
+ key := fmt.Sprintf("%s (%s)", name, currency)
for i := range dates {
if !(reg.Dates()[0] <= dates[i] && dates[i] <= reg.Dates()[len(reg.Dates())-1]) {
series[i] = 0
+ } else {
+ instant[key] = fmt.Sprintf("@%s %v", dates[i], series[i])
}
}
- key := fmt.Sprintf("%s (%s)", name, currency)
if slices.Min(series) != 0 || slices.Max(series) != 0 {
chart.AddY(key, series)
}
@@ -283,6 +288,9 @@ func main() {
if err := primary.Render(w); err != nil {
panic(err)
}
+ for k, v := range instant {
+ fmt.Fprintf(w, "
\n%s = %s", k, v)
+ }
}
log.Println("listening on", *httpOutput)