diff --git a/changes/27052-round-live-policy-percentages b/changes/27052-round-live-policy-percentages new file mode 100644 index 0000000000..3c3b734270 --- /dev/null +++ b/changes/27052-round-live-policy-percentages @@ -0,0 +1 @@ +- Fix a small bug with the way live policy result percentages were being rounded diff --git a/frontend/pages/policies/PolicyPage/components/PolicyResults/PolicyResults.tsx b/frontend/pages/policies/PolicyPage/components/PolicyResults/PolicyResults.tsx index 357ef9afd9..e1dafa95d8 100644 --- a/frontend/pages/policies/PolicyPage/components/PolicyResults/PolicyResults.tsx +++ b/frontend/pages/policies/PolicyPage/components/PolicyResults/PolicyResults.tsx @@ -144,11 +144,11 @@ const PolicyResults = ({ {" "} (Yes:{" "} - {Math.ceil((yesCt / uiHostCounts.successful) * 100)}% + {Math.round((yesCt / uiHostCounts.successful) * 100)}% , No:{" "} - {Math.floor((noCt / uiHostCounts.successful) * 100)}% + {Math.round((noCt / uiHostCounts.successful) * 100)}% )