From b57c25843bc08bbb0127f0a3d1bdb6260a9dc862 Mon Sep 17 00:00:00 2001 From: ellite Date: Thu, 16 Nov 2023 21:43:33 +0100 Subject: [PATCH] Only show graphs if there's more than 1 item --- stats.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stats.php b/stats.php index 00f0d29..0bca08d 100644 --- a/stats.php +++ b/stats.php @@ -186,7 +186,7 @@ if ($result) {

Split Views

1; + $showCategoryCostGraph = count($categoryDataPoints) > 1; + $memberDataPoints = []; foreach ($memberCost as $member) { if ($member['cost'] != 0) { $memberDataPoints[] = [ @@ -208,7 +209,7 @@ if ($result) { } } - $showMemberCostGraph = count($memberCost) > 1; + $showMemberCostGraph = count($memberDataPoints) > 1; if ($showMemberCostGraph) { ?> @@ -238,7 +239,7 @@ if ($result) {