fix category scale for manually awarded points

This commit is contained in:
pi-rho 2017-11-16 13:41:20 -07:00
parent 6b4792a4c3
commit 564b49832e
1 changed files with 3 additions and 3 deletions

View File

@ -499,13 +499,13 @@ function scoreboard(element, continuous, mode, interval) {
var row = document.createElement("div"); var row = document.createElement("div");
var ncat = 0; var ncat = 0;
for (var category in allQuestions) { for (var category in allQuestions) {
var catHigh = allQuestions[category]; var catHigh = highscore[category];
var catTeam = team[category] || 0; var catTeam = team[category] || 0;
var catPct = (0.0 + catTeam) / (0.0 + catHigh["total"]); var catPct = (0.0 + catTeam) / (0.0 + catHigh);
var width = maxWidth * catPct; var width = maxWidth * catPct;
var bar = document.createElement("span"); var bar = document.createElement("span");
var numLeft = catHigh["total"] - catTeam; var numLeft = catHigh - catTeam;
//bar.classList.add("cat" + ncat); //bar.classList.add("cat" + ncat);
bar.style.backgroundColor = colorScale[ncat % 20]; bar.style.backgroundColor = colorScale[ncat % 20];