Skip to content

Commit

Permalink
Revert "[frontend] Invert color scale for heatmap"
Browse files Browse the repository at this point in the history
This reverts commit 71889d3.
  • Loading branch information
MananGandhi1810 committed Nov 24, 2024
1 parent 71889d3 commit 25f9656
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/pages/UserData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ function UserData() {
};
for (var i = 0; i < userProfile.submissions.length; i++) {
problems.add(userProfile.submissions[i].problemStatementId);
ratio[
userProfile.submissions[i].success ? "success" : "failure"
] += 1;
ratio[userProfile.submissions[i].success ? "success" : "failure"] +=
1;
}
setTotalProblems(problems.size);
setSubmissionRatio(ratio);
Expand Down Expand Up @@ -188,7 +187,7 @@ function UserData() {
return "color-empty";
}
return `color-scale-${Math.ceil(
5 - (4 * value.count) / maxSubmissions,
(4 * value.count) / maxSubmissions,
)}`;
}}
/>
Expand Down

0 comments on commit 25f9656

Please sign in to comment.