From 7722537041ad2e088096ec7ee67a1ca455891d5a Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Fri, 6 Dec 2024 17:37:22 +0100 Subject: [PATCH] Added F tier --- frontend/components/tierlist/Chart.vue | 9 ++++----- frontend/pages/tierlist/[lane].vue | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/components/tierlist/Chart.vue b/frontend/components/tierlist/Chart.vue index c84e9f6..b998748 100644 --- a/frontend/components/tierlist/Chart.vue +++ b/frontend/components/tierlist/Chart.vue @@ -13,20 +13,19 @@ const labels: Array = [] const pickrates: Array = [] const images: Array = [] const backgroundColors: Array = [] -const tier_colors = ["#ff7f7e", "#ffbf7f", "#ffdf80", "#feff7f", "#beff7f"] -const datasets = [] +const CHAMPION_CUT_THRESHOLD = 32 +const TIER_COLORS = ["#ff7f7e", "#ffbf7f", "#ffdf80", "#feff7f", "#beff7f", "#7eff80"] let count = 0 let colorIndex = 0 for(let tier of props.data) { for(let {champion: champion, lane: lane} of tier.data) { - if(count > 35) break; + if(count > CHAMPION_CUT_THRESHOLD) break; labels.push(champion.name) pickrates.push(lane.pickrate * 100) images.push(CDRAGON_BASE + mapPath(champion.squarePortraitPath)) - // backgroundColors.push('#B7B8E1') - backgroundColors.push(tier_colors[colorIndex]) + backgroundColors.push(TIER_COLORS[colorIndex]) count++ } diff --git a/frontend/pages/tierlist/[lane].vue b/frontend/pages/tierlist/[lane].vue index 564a7e7..169227a 100644 --- a/frontend/pages/tierlist/[lane].vue +++ b/frontend/pages/tierlist/[lane].vue @@ -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: "C", data: tierFromScaledPickrate(0.3, 0.5)}) tiers.push({title: "D", data: tierFromScaledPickrate(0.1, 0.3)}) +tiers.push({title: "F", data: tierFromScaledPickrate(0, 0.1)})