Don't show detailed doughnut tooltip if sum is 99.99%

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2022-10-13 09:29:35 +02:00
parent 18ba3db8c2
commit 4627fba09a

View File

@@ -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 {