aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/graphs.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-09-03 10:09:08 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-09-04 14:21:20 +0000
commitdfbe2ed44f34f8bdabc5ca598387d7543fb9591b (patch)
tree64a441356df901b1a6619690128eb62e6bcc3689 /dashboard/app/graphs.go
parent8cf7b72368903bf5225e088dd330cc47e34d8bb5 (diff)
dashboard/app: add total value on Bugs/Month graph
Diffstat (limited to 'dashboard/app/graphs.go')
-rw-r--r--dashboard/app/graphs.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/dashboard/app/graphs.go b/dashboard/app/graphs.go
index e4ded73d6..f3f62577e 100644
--- a/dashboard/app/graphs.go
+++ b/dashboard/app/graphs.go
@@ -73,8 +73,9 @@ type uiGraphHeader struct {
}
type uiGraphColumn struct {
- Hint string
- Vals []uiGraphValue
+ Hint string
+ Annotation float32
+ Vals []uiGraphValue
}
type uiGraphValue struct {
@@ -499,7 +500,9 @@ func createFoundBugs(c context.Context, bugs []*Bug) *uiGraph {
col := uiGraphColumn{Hint: month.Format("Jan-06")}
stats := months[month]
for _, typ := range types {
- col.Vals = append(col.Vals, uiGraphValue{Val: float32(stats[typ.name])})
+ val := float32(stats[typ.name])
+ col.Vals = append(col.Vals, uiGraphValue{Val: val})
+ col.Annotation += val
}
columns = append(columns, col)
}