Skip to content

Commit

Permalink
Add minimal rounding to account for internal rounding errors to suppr…
Browse files Browse the repository at this point in the history
…ess detailed tooltip on doughnut charts if nothing is hidden

Signed-off-by: Christian König <ckoenig@posteo.de>
  • Loading branch information
yubiuser committed Oct 5, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8979ac3 commit c1c4dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/index.js
Original file line number Diff line number Diff line change
@@ -724,7 +724,7 @@ function updateSummaryData(runOnce) {
}

function doughnutTooltip(tooltipLabel) {
var percentageTotalShown = tooltipLabel.chart._metasets[0].total;
var percentageTotalShown = tooltipLabel.chart._metasets[0].total.toFixed(2);
var label = " " + tooltipLabel.label;

if (percentageTotalShown >= 100) {

0 comments on commit c1c4dba

Please sign in to comment.