fix category scale for manually awarded points

This commit is contained in:
pi-rho 2017-11-16 13:41:20 -07:00
parent 22357dc840
commit 13334026a1
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 ncat = 0;
for (var category in allQuestions) {
var catHigh = allQuestions[category];
var catHigh = highscore[category];
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 bar = document.createElement("span");
var numLeft = catHigh["total"] - catTeam;
var numLeft = catHigh - catTeam;
//bar.classList.add("cat" + ncat);
bar.style.backgroundColor = colorScale[ncat % 20];