You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,7 +60,7 @@ function printTable(table, data, mergeParties, mergeDistricts, mergedDistrictLab
56
60
table.tBodies[0].innerHTML="";
57
61
58
62
// Print table
59
-
constformat=(x,total)=>showFraction ? ((Math.floor(1000*x/total)/10).toFixed(1)+" %") : x.toLocaleString("no-NO");// floor instead of rounding, so parties slightly below threshold cannot seem to be above it (e.g. show 3.999% as 3.9% instead of 4.0%)
63
+
constformat=(x,total)=>showFraction ? (roundDown(100*x/total,decimals)+" %") : x.toLocaleString("no-NO");// round *down* so parties slightly below threshold cannot seem to be above it (e.g. show 3.999% as 3.9% instead of 4.0%)
0 commit comments