From e6ddc27d5ca9774330f4f683e07c49572ddb9730 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Sat, 27 Jun 2026 11:53:16 +0200 Subject: [PATCH] feat/frontend: center winrates arround 50% and add graph title --- frontend/components/tierlist/Chart.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/components/tierlist/Chart.vue b/frontend/components/tierlist/Chart.vue index d2cbf08..6363564 100644 --- a/frontend/components/tierlist/Chart.vue +++ b/frontend/components/tierlist/Chart.vue @@ -68,6 +68,24 @@ const chartOptions = ref({ ticks: { callback: () => '' } + }, + y: { + title: { + display: true, + text: props.metric === 'winrate' ? 'Winrate (%)' : 'Pickrate (%)' + }, + ...(props.metric === 'winrate' + ? { + min: 40, + max: 60, + grid: { + color: (context: { tick: { value: number } }) => + context.tick.value === 50 ? '#666' : 'rgba(0, 0, 0, 0.1)', + lineWidth: (context: { tick: { value: number } }) => + context.tick.value === 50 ? 2 : 1 + } + } + : {}) } }, plugins: {