diff --git a/ana/prediction.go b/ana/prediction.go
index 13f678b..a2ae911 100644
--- a/ana/prediction.go
+++ b/ana/prediction.go
@@ -38,7 +38,8 @@ func (prediction Prediction) predict(latest ledger.Balances, from time.Time, the
func (prediction Prediction) predictOne(balances ledger.Balances, elapsed time.Duration) ledger.Balances {
for i := range prediction {
- balances = prediction[i](balances, elapsed)
+ next := prediction[i](balances, elapsed)
+ balances = next
}
return balances
}
diff --git a/cmd/clitest/index.html b/cmd/clitest/index.html
index 6fd5130..cbb3102 100644
--- a/cmd/clitest/index.html
+++ b/cmd/clitest/index.html
@@ -65,7 +65,7 @@
-
+
diff --git a/cmd/clitest/main.go b/cmd/clitest/main.go
index 36738e4..f8bec05 100644
--- a/cmd/clitest/main.go
+++ b/cmd/clitest/main.go
@@ -234,7 +234,6 @@ func main() {
}
primary := toChart(r.URL.Path == "/bal", r.URL.Query().Get("chart"), register)
if len(predicted) > 0 {
- log.Printf("overlapping predicted: %+v", predicted)
primary.Overlap(toChart(r.URL.Path == "/bal", "line", predicted))
}
if err := primary.Render(w); err != nil {
@@ -343,7 +342,10 @@ func (line Line) AddY(name string, v []int) {
for i := range y {
y[i].Value = v[i]
}
- line.AddSeries(name, y)
+ line.AddSeries(name, y).
+ SetSeriesOptions(charts.WithBarChartOpts(opts.BarChart{
+ Stack: "stackB",
+ }))
}
func (line Line) Overlap(other Chart) {