From 91e8a5cf14ff0bb30a78ad9cda6014700e7a73a3 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Sun, 26 Apr 2020 12:04:46 +0200 Subject: Fix generation of multi-user graphs --- escato.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/escato.pl b/escato.pl index 014064b..0f804ce 100755 --- a/escato.pl +++ b/escato.pl @@ -71,7 +71,9 @@ sub show_dumps { push @shures, {username => $shur->{'username'}, data => tg_id_dumps($shur->{'id'})}; } - $graph_b64 = gen_graph(map { {$_->{username} => $_->{data}{points}} } @shures); + my %graph_info; + $graph_info{$_->{username}} = $_->{data}{points} foreach (@shures); + $graph_b64 = gen_graph(\%graph_info); foreach my $shur (sort { $b->{data}{month} <=> $a->{data}{month} } @shures) { $out .= sprintf "%d - @%s ha cagado %d veces este mes, y %d al año.\n", $position++, $shur->{username}, $shur->{data}{month}, $shur->{data}{year}; -- cgit v1.2.3