From 4627fba09a369dbf9d852d41414ebc307e2594d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu, 13 Oct 2022 09:29:35 +0200 Subject: [PATCH] Don't show detailed doughnut tooltip if sum is 99.99% MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 9c838cf5..f6671178 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -726,8 +726,7 @@ function updateSummaryData(runOnce) { function doughnutTooltip(tooltipLabel) { var percentageTotalShown = tooltipLabel.chart._metasets[0].total.toFixed(2); var label = " " + tooltipLabel.label; - - if (percentageTotalShown >= 100) { + if (percentageTotalShown >= 99.99) { // All items shown return label + ": " + tooltipLabel.parsed.toFixed(1) + "%"; } else {