From d35c7577bf5ec669f89f07c66679c66daa132b0f Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:38:48 -0700 Subject: [PATCH] Fixed call forward chart not showing up (#6547) Fixed a bug where the chart doesn't show up when all the values are equal to 0. --- .../resources/dashboard/call_forward.php | 131 +++++++++--------- 1 file changed, 68 insertions(+), 63 deletions(-) diff --git a/app/call_forward/resources/dashboard/call_forward.php b/app/call_forward/resources/dashboard/call_forward.php index 3b6c00209c..b276793fb7 100644 --- a/app/call_forward/resources/dashboard/call_forward.php +++ b/app/call_forward/resources/dashboard/call_forward.php @@ -92,69 +92,74 @@ //begin widget echo "
\n"; -//doughnut chart - if ($show_stat) { - echo "
\n"; - echo "
\n"; - echo "
\n"; +//set defaults + if ($stats['dnd'] == null) { $stats['dnd'] = 0; } + if ($stats['follow_me'] == null) { $stats['follow_me'] = 0; } + if ($stats['call_forward'] == null) { $stats['call_forward'] = 0; } + if ($stats['active'] == null) { $stats['active'] = 0; } - echo "\n"; - } +//doughnut chart + echo "
\n"; + echo "
\n"; + echo "
\n"; + + echo "\n"; //details echo "
"; @@ -212,4 +217,4 @@ echo "\n"; echo "
\n"; -?> \ No newline at end of file +?>