From b97a67c599372dcef96a1cbe5ca49886cabbd92d Mon Sep 17 00:00:00 2001 From: pi-rho Date: Thu, 16 Nov 2017 13:45:25 -0700 Subject: [PATCH] logscale for giant categories --- www/scoreboard-llnl.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/scoreboard-llnl.js b/www/scoreboard-llnl.js index a76a28d..ffebd16 100644 --- a/www/scoreboard-llnl.js +++ b/www/scoreboard-llnl.js @@ -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");