mirror of https://github.com/dirtbags/moth.git
logscale for giant categories
This commit is contained in:
parent
c74ab139db
commit
8a2c103ed4
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue