feat: add numbers to RaceChart

This commit is contained in:
julius 2025-03-03 16:05:28 +01:00
parent 406ea9ffdd
commit 70a4ece5bc
Signed by: julius
GPG Key ID: C80A63E6A5FD7092

View File

@ -64,13 +64,13 @@ const RaceChart: FC<RaceChartProps> = ({ players, std }) => {
paintOrder={"stroke fill"} paintOrder={"stroke fill"}
fontFamily="monospace" fontFamily="monospace"
> >
{player.name} {index + 1}. {player.name}
</text> </text>
<text <text
key={index} key={index}
x={ x={
4 + 4 +
Math.max(...players.map((p, _) => p.name.length)) * (4 + Math.max(...players.map((p, _) => p.name.length))) *
(barHeight - 1.5 * gap) * (barHeight - 1.5 * gap) *
0.66 0.66
} }