added parsed check to scoreboard, added team color vars + team-colors in damage-chart

This commit is contained in:
cnachtigall1991
2021-10-12 07:04:22 +02:00
parent 5227f05414
commit 33fd9f6b5c
6 changed files with 63 additions and 25 deletions

View File

@@ -46,11 +46,21 @@ export default {
let arr = []
if (team === 1) {
for (let i = 0; i < 5; i++) {
arr.push(truncate(stats[i].player.name, 10))
arr.push({
value: truncate(stats[i].player.name, 10),
textStyle: {
color: 'white'
}
})
}
} else {
for (let i = 5; i < stats.length; i++) {
arr.push(truncate(stats[i].player.name, 10))
arr.push({
value: truncate(stats[i].player.name, 10),
textStyle: {
color: 'white'
}
})
}
}
arr.reverse()
@@ -76,11 +86,21 @@ export default {
let arr = []
if (team === 1) {
for (let i = 0; i < 5; i++) {
arr.push(checkStatEmpty(stats[i].extended.dmg.enemy))
arr.push({
value: checkStatEmpty(stats[i].extended.dmg.enemy),
itemStyle: {
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
}
})
}
} else {
for (let i = 5; i < stats.length; i++) {
arr.push(checkStatEmpty(stats[i].extended.dmg.enemy))
arr.push({
value: checkStatEmpty(stats[i].extended.dmg.enemy),
itemStyle: {
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
}
})
}
}
arr.reverse()
@@ -139,7 +159,6 @@ export default {
name: 'Enemy',
type: 'bar',
stack: 'Total',
color: ['orange'],
label: {
show: true,
position: 'inside'