remove date from charts

This commit is contained in:
hannes 2023-12-07 21:43:36 +00:00
parent f18c384e79
commit 52f76dad12

View file

@ -105,7 +105,7 @@ fn (mut app App) get_ordered_per_hour() ![]PerHour {
}! }!
grouped := arrays.group_by(people, fn (p Person) string { grouped := arrays.group_by(people, fn (p Person) string {
return '${p.order_time.hour}:${int(p.order_time.minute / 30) * 30} ${p.order_time.day}/${p.order_time.month}' return '${p.order_time.hour}:${int(p.order_time.minute / 30) * 30}'
}) })
max_per_hour := arrays.max(grouped.values().map(it.len)) or { 1 } + 10 max_per_hour := arrays.max(grouped.values().map(it.len)) or { 1 } + 10
@ -129,7 +129,7 @@ fn (mut app App) get_finished_per_hour() ![]PerHour {
}! }!
grouped := arrays.group_by(people, fn (p Person) string { grouped := arrays.group_by(people, fn (p Person) string {
return '${p.order_time.hour}:${int(p.order_time.minute / 30) * 30} ${p.order_time.day}/${p.order_time.month}' return '${p.order_time.hour}:${int(p.order_time.minute / 30) * 30}'
}) })
max_per_hour := arrays.max(grouped.values().map(it.len)) or { 1 } + 10 max_per_hour := arrays.max(grouped.values().map(it.len)) or { 1 } + 10