Add helm chart

This commit is contained in:
2025-10-09 22:59:26 +08:00
parent 09d5c79e8d
commit 6886f94888
19 changed files with 1836 additions and 12 deletions
+11 -7
View File
@@ -136,14 +136,15 @@
margin-bottom: 4px;
position: relative;
overflow: hidden;
background-color: #e9ecef; /* Light gray background for empty bars */
}
.poty-bar-motm {
background: linear-gradient(90deg, #28a745, #20c997);
background-color: rgba(40, 167, 69, 0.1); /* Very light green background */
}
.poty-bar-dotd {
background: linear-gradient(90deg, #dc3545, #fd7e14);
background-color: rgba(220, 53, 69, 0.1); /* Very light red background */
}
.poty-bar-fill {
@@ -238,7 +239,7 @@ function renderPOTYChart(data) {
return a.dotdTotal - b.dotdTotal;
});
// Find max values for scaling - each bar scales independently
// Find max values for independent scaling - each bar type scales to its own maximum
const maxMotm = Math.max(...data.map(p => p.motmTotal || 0));
const maxDotd = Math.max(...data.map(p => p.dotdTotal || 0));
@@ -249,6 +250,9 @@ function renderPOTYChart(data) {
const ranking = index + 1;
const rankingClass = ranking === 1 ? 'gold' : ranking === 2 ? 'silver' : ranking === 3 ? 'bronze' : '';
const motmVotes = player.motmTotal || 0;
const dotdVotes = player.dotdTotal || 0;
html += '<div class="poty-player-card">';
html += '<div class="d-flex align-items-center">';
html += '<div class="poty-ranking ' + rankingClass + '">' + ranking + '</div>';
@@ -256,19 +260,19 @@ function renderPOTYChart(data) {
html += '<div class="poty-player-name">' + (player.playerName || 'Unknown Player') + '</div>';
html += '<div class="poty-stats">';
html += '<div class="poty-stat">';
html += '<div class="poty-stat-value text-success">' + (player.motmTotal || 0) + '</div>';
html += '<div class="poty-stat-value text-success">' + motmVotes + '</div>';
html += '<div class="poty-stat-label">MOTM</div>';
html += '</div>';
html += '<div class="poty-stat">';
html += '<div class="poty-stat-value text-danger">' + (player.dotdTotal || 0) + '</div>';
html += '<div class="poty-stat-value text-danger">' + dotdVotes + '</div>';
html += '<div class="poty-stat-label">DotD</div>';
html += '</div>';
html += '<div class="poty-bar-container">';
html += '<div class="poty-bar poty-bar-motm">';
html += '<div class="poty-bar-fill" style="width: ' + (maxMotm > 0 ? ((player.motmTotal || 0) / maxMotm * 100) : 0) + '%"></div>';
html += '<div class="poty-bar-fill" style="width: ' + (maxMotm > 0 ? (motmVotes / maxMotm * 100) : 0) + '%"></div>';
html += '</div>';
html += '<div class="poty-bar poty-bar-dotd">';
html += '<div class="poty-bar-fill" style="width: ' + (maxDotd > 0 ? ((player.dotdTotal || 0) / maxDotd * 100) : 0) + '%"></div>';
html += '<div class="poty-bar-fill" style="width: ' + (maxDotd > 0 ? (dotdVotes / maxDotd * 100) : 0) + '%"></div>';
html += '</div>';
html += '</div>';
html += '</div>';