From aeba7c958d29272614c8500254627259f4901696 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 28 Jun 2020 21:41:39 +0200 Subject: [PATCH] Only show query types for which the count is larger than zero. Signed-off-by: DL6ER --- scripts/pi-hole/js/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 703aa174..7f587f2e 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -306,9 +306,11 @@ function updateQueryTypesPie() { } Object.keys(iter).forEach(function (key) { - v.push(iter[key]); - c.push(THEME_COLORS[i++ % THEME_COLORS.length]); - k.push(key); + if (iter[key] > 0) { + v.push(iter[key]); + c.push(THEME_COLORS[i++ % THEME_COLORS.length]); + k.push(key); + } }); // Build a single dataset with the data to be pushed