3.0.1: fix
This commit is contained in:
@@ -338,10 +338,10 @@ function tacticsBoard() {
|
||||
this.radarChart = new Chart(ctx, {
|
||||
type: 'radar',
|
||||
data: {
|
||||
labels: ['RTG', 'K/D', 'KST', 'ADR', 'IMP', 'UTL'],
|
||||
labels: ['枪法', '生存', '道具', '残局', '经济', '节奏', '手枪', '稳定'],
|
||||
datasets: [{
|
||||
label: 'Avg',
|
||||
data: [0, 0, 0, 0, 0, 0],
|
||||
data: [0, 0, 0, 0, 0, 0, 0, 0],
|
||||
backgroundColor: 'rgba(139, 92, 246, 0.2)',
|
||||
borderColor: 'rgba(139, 92, 246, 1)',
|
||||
pointBackgroundColor: 'rgba(139, 92, 246, 1)',
|
||||
@@ -354,7 +354,7 @@ function tacticsBoard() {
|
||||
scales: {
|
||||
r: {
|
||||
beginAtZero: true,
|
||||
max: 1.5,
|
||||
max: 100,
|
||||
grid: { color: 'rgba(156, 163, 175, 0.1)' },
|
||||
angleLines: { color: 'rgba(156, 163, 175, 0.1)' },
|
||||
pointLabels: { font: { size: 9 } },
|
||||
@@ -368,20 +368,22 @@ function tacticsBoard() {
|
||||
|
||||
updateRadar() {
|
||||
if (this.activePlayers.length === 0) {
|
||||
this.radarChart.data.datasets[0].data = [0, 0, 0, 0, 0, 0];
|
||||
this.radarChart.data.datasets[0].data = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
this.radarChart.update();
|
||||
return;
|
||||
}
|
||||
|
||||
let totals = [0, 0, 0, 0, 0, 0];
|
||||
let totals = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
this.activePlayers.forEach(p => {
|
||||
const s = p.stats || {};
|
||||
totals[0] += s.basic_avg_rating || 0;
|
||||
totals[1] += s.basic_avg_kd || 0;
|
||||
totals[2] += s.basic_avg_kast || 0;
|
||||
totals[3] += (s.basic_avg_adr || 0) / 100;
|
||||
totals[4] += s.bat_avg_impact || 1.0;
|
||||
totals[5] += s.util_usage_rate || 0.5;
|
||||
totals[0] += s.score_aim || 0;
|
||||
totals[1] += s.score_defense || 0;
|
||||
totals[2] += s.score_utility || 0;
|
||||
totals[3] += s.score_clutch || 0;
|
||||
totals[4] += s.score_economy || 0;
|
||||
totals[5] += s.score_pace || 0;
|
||||
totals[6] += s.score_pistol || 0;
|
||||
totals[7] += s.score_stability || 0;
|
||||
});
|
||||
|
||||
const count = this.activePlayers.length;
|
||||
@@ -393,4 +395,4 @@ function tacticsBoard() {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user