feat/frontend: center winrates arround 50% and add graph title
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user