histogram width divide by mode, not total

Divide by the value that occurs the most frequently, instead of the total games, so the histogram always uses the whole space available, rather than possibly getting smaller and smaller the more games are played.
This commit is contained in:
Jacob Louis Hoover 2022-01-25 13:00:19 -05:00 committed by GitHub
parent 51457ee8d4
commit 3f6d65fc68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ export const Histogram = ({ gameStats }: Props) => {
<Progress
key={i}
index={i}
size={95 * (value / totalGames)}
size={95 * (value / Math.max(...winDistribution)}
label={String(value)}
/>
))}