refactored to match api-changes + added multi-kill-chart

This commit is contained in:
cnachtigall1991
2021-10-13 18:19:05 +02:00
parent f033f4bd26
commit 66c18ffe02
7 changed files with 270 additions and 66 deletions

View File

@@ -71,11 +71,11 @@ export default {
let arr = []
if (team === 1) {
for (let i = 0; i < 5; i++) {
arr.push(-checkStatEmpty(stats[i].extended.dmg.team))
arr.push(-checkStatEmpty(stats[i].dmg.team))
}
} else {
for (let i = 5; i < stats.length; i++) {
arr.push(-checkStatEmpty(stats[i].extended.dmg.team))
arr.push(-checkStatEmpty(stats[i].dmg.team))
}
}
arr.reverse()
@@ -87,18 +87,18 @@ export default {
if (team === 1) {
for (let i = 0; i < 5; i++) {
arr.push({
value: checkStatEmpty(stats[i].extended.dmg.enemy),
value: checkStatEmpty(stats[i].dmg.enemy),
itemStyle: {
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].color}`)
}
})
}
} else {
for (let i = 5; i < stats.length; i++) {
arr.push({
value: checkStatEmpty(stats[i].extended.dmg.enemy),
value: checkStatEmpty(stats[i].dmg.enemy),
itemStyle: {
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].extended.color}`)
color: getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].color}`)
}
})
}