feat/frontend: center winrates arround 50% and add graph title
pipeline / lint-and-format (push) Successful in 4m17s
pipeline / build-and-push-images (push) Successful in 2m4s

This commit is contained in:
2026-06-27 11:53:16 +02:00
parent f2827f85eb
commit e6ddc27d5c
+18
View File
@@ -68,6 +68,24 @@ const chartOptions = ref({
ticks: { ticks: {
callback: () => '' 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: { plugins: {