aboutsummaryrefslogtreecommitdiff
path: root/country.go
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2020-03-16 11:24:04 +0000
committerFelix Hanley <felix@userspace.com.au>2020-03-16 11:24:04 +0000
commit2248b4d7e1d083a103e94985ee4b373d689ae0e8 (patch)
tree20a3f12a7d793ddadd5225e3e0cb44fa738682a5 /country.go
parentc16f2a68eeb6550743354245f95605a141c1d020 (diff)
downloadsws-2248b4d7e1d083a103e94985ee4b373d689ae0e8.tar.gz
sws-2248b4d7e1d083a103e94985ee4b373d689ae0e8.tar.bz2
Update graph displays and supporting helpers
Diffstat (limited to 'country.go')
-rw-r--r--country.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/country.go b/country.go
index a875f66..d5bbe48 100644
--- a/country.go
+++ b/country.go
@@ -67,6 +67,13 @@ func (cs CountrySet) YMax() int {
}
return max
}
+func (cs CountrySet) YSum() int {
+ sum := 0
+ for _, c := range cs {
+ sum += c.hitSet.Count()
+ }
+ return sum
+}
func (cs CountrySet) XSeries() []*Country {
return cs
}