Skip to content

Commit

Permalink
Fix y-axis scale for Totals
Browse files Browse the repository at this point in the history
This would use pageviews, rather than visits, from back when that would
be displayed in the chart. In most cases it didn't look so odd, but in a
few cases where a small group of visitors have many pageviews it's way
too much.
  • Loading branch information
arp242 committed Oct 18, 2022
1 parent 3ec9f85 commit 9f0d43f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hit_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (h *HitList) Totals(ctx context.Context, rng ztime.Range, pathFilter []int6
for _, v := range stats {
totalst.Stats = append(totalst.Stats, v)
if !daily {
for _, x := range v.Hourly {
for _, x := range v.HourlyUnique {
if x > max {
max = x
}
Expand All @@ -275,7 +275,7 @@ func (h *HitList) Totals(ctx context.Context, rng ztime.Range, pathFilter []int6
for _, n := range hh[0].Stats[i].HourlyUnique {
hh[0].Stats[i].DailyUnique += n
}
if daily && hh[0].Stats[i].Daily > max {
if daily && hh[0].Stats[i].DailyUnique > max {
max = hh[0].Stats[i].Daily
}
}
Expand Down

0 comments on commit 9f0d43f

Please sign in to comment.