todo, omit only zeroes from htlm

main
Bel LaPointe 2023-10-25 10:08:27 -06:00
parent 3dd236a3b4
commit fb668027c5
2 changed files with 7 additions and 2 deletions

View File

@ -103,7 +103,9 @@ func main() {
series[i] = int(lastValue) series[i] = int(lastValue)
} }
key := fmt.Sprintf("%s (%s)", name, currency) key := fmt.Sprintf("%s (%s)", name, currency)
line.AddYAxis(key, series) if slices.Min(series) != 0 || slices.Max(series) != 0 {
line.AddYAxis(key, series)
}
} }
} }
case "/reg": case "/reg":
@ -122,7 +124,9 @@ func main() {
series[i] = int(lastValue - prevValue) series[i] = int(lastValue - prevValue)
} }
key := fmt.Sprintf("%s (%s)", name, currency) key := fmt.Sprintf("%s (%s)", name, currency)
line.AddYAxis(key, series) if slices.Min(series) != 0 || slices.Max(series) != 0 {
line.AddYAxis(key, series)
}
} }
} }
} }

View File

@ -1,4 +1,5 @@
todo: todo:
- html has stacked bar chart version
- html version has fields and submit button rather than query params by hand - html version has fields and submit button rather than query params by hand
- html version can accept new transactions for moolah - html version can accept new transactions for moolah
- html version has projections based on compounding/non compounding interest and rate - html version has projections based on compounding/non compounding interest and rate