From 500f3de6a98997f8d6295e351714fff7a24fb442 Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:17:10 +0100 Subject: [PATCH] Update dashboard.tpl fixed inactive users in graph --- ui/ui/dashboard.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/ui/dashboard.tpl b/ui/ui/dashboard.tpl index a3ff1527..5a39c776 100644 --- a/ui/ui/dashboard.tpl +++ b/ui/ui/dashboard.tpl @@ -308,13 +308,15 @@ var u_act = '{/literal}{$u_act}{literal}'; var c_all = '{/literal}{$c_all}{literal}'; var u_all = '{/literal}{$u_all}{literal}'; + //lets calculate the inactive users as reported + var inactive = u_all - u_act; // Create the chart data var data = { labels: ['Active Users', 'Inactive Users', 'Total Users'], datasets: [{ label: 'User Recharges', - data: [parseInt(u_act), parseInt(u_all), parseInt(c_all)], + data: [parseInt(u_act), parseInt(inactive), parseInt(c_all)], backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'], borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'], borderWidth: 1