logscale for giant categories

This commit is contained in:
pi-rho 2017-11-16 13:45:25 -07:00
parent c74ab139db
commit 8a2c103ed4
1 changed files with 6 additions and 1 deletions

View File

@ -467,7 +467,12 @@ function scoreboard(element, continuous, mode, interval) {
for (var category in allQuestions) {
var catHigh = highscore[category];
var catTeam = team[category] || 0;
var catPct = (0.0 + catTeam) / (0.0 + catHigh);
var catPct = 0;
if (catHigh > 30000) {
catPct = (0.0 + Math.log(1+catTeam)) / (0.0 + Math.log(1+catHigh));
} else {
catPct = (0.0 + catTeam) / (0.0 + catHigh);
}
var width = maxWidth * catPct;
var bar = document.createElement("span");