Skip to content

Commit

Permalink
Fix percentile calcs
Browse files Browse the repository at this point in the history
  • Loading branch information
chadokruse committed Dec 7, 2024
1 parent b3f63f1 commit 99bef6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
const getLabel = (pct: number | 'N/A') => {
if (pct === 'N/A') return 'N/A';
if (pct <= 50) return '<50% Percentile';
if (pct > 99) return 'Top 1%';
return `Top ${(100 - pct).toFixed(0)}%`;
if (pct >= 99) return 'Top 1%';
return `Top ${Math.ceil(100 - pct)}%`;
};
let getBarColor = (pct: number | 'N/A') => {
Expand Down

0 comments on commit 99bef6f

Please sign in to comment.