Added F tier
All checks were successful
pipeline / build-and-push-images (push) Successful in 31s
pipeline / deploy (push) Successful in 7s

This commit is contained in:
2024-12-06 17:37:22 +01:00
parent 56e4b89aea
commit 7722537041
2 changed files with 5 additions and 5 deletions

View File

@@ -13,20 +13,19 @@ const labels: Array<string> = []
const pickrates: Array<number> = [] const pickrates: Array<number> = []
const images: Array<string> = [] const images: Array<string> = []
const backgroundColors: Array<string> = [] const backgroundColors: Array<string> = []
const tier_colors = ["#ff7f7e", "#ffbf7f", "#ffdf80", "#feff7f", "#beff7f"] const CHAMPION_CUT_THRESHOLD = 32
const datasets = [] const TIER_COLORS = ["#ff7f7e", "#ffbf7f", "#ffdf80", "#feff7f", "#beff7f", "#7eff80"]
let count = 0 let count = 0
let colorIndex = 0 let colorIndex = 0
for(let tier of props.data) { for(let tier of props.data) {
for(let {champion: champion, lane: lane} of tier.data) { for(let {champion: champion, lane: lane} of tier.data) {
if(count > 35) break; if(count > CHAMPION_CUT_THRESHOLD) break;
labels.push(champion.name) labels.push(champion.name)
pickrates.push(lane.pickrate * 100) pickrates.push(lane.pickrate * 100)
images.push(CDRAGON_BASE + mapPath(champion.squarePortraitPath)) images.push(CDRAGON_BASE + mapPath(champion.squarePortraitPath))
// backgroundColors.push('#B7B8E1') backgroundColors.push(TIER_COLORS[colorIndex])
backgroundColors.push(tier_colors[colorIndex])
count++ count++
} }

View File

@@ -53,6 +53,7 @@ tiers.push({title: "A", data: tierFromScaledPickrate(0.7, 0.9)})
tiers.push({title: "B", data: tierFromScaledPickrate(0.5, 0.7)}) tiers.push({title: "B", data: tierFromScaledPickrate(0.5, 0.7)})
tiers.push({title: "C", data: tierFromScaledPickrate(0.3, 0.5)}) tiers.push({title: "C", data: tierFromScaledPickrate(0.3, 0.5)})
tiers.push({title: "D", data: tierFromScaledPickrate(0.1, 0.3)}) tiers.push({title: "D", data: tierFromScaledPickrate(0.1, 0.3)})
tiers.push({title: "F", data: tierFromScaledPickrate(0, 0.1)})
</script> </script>
<template> <template>