Skip to content

Handle scenarios where match stat values are zero#15569

Open
jamesmockett wants to merge 1 commit intomainfrom
jm/match-stat-zero
Open

Handle scenarios where match stat values are zero#15569
jamesmockett wants to merge 1 commit intomainfrom
jm/match-stat-zero

Conversation

@jamesmockett
Copy link
Contributor

@jamesmockett jamesmockett commented Mar 20, 2026

What does this change?

Updates football match stat component so it renders correctly in scenarios where one or both values are zero

Why?

Currently the component renders incorrectly (and throws a JS error due to a division by zero when calculating the bar length). As this component appears on football live blogs this is a common scenario as the match stats will be zero at the beginning on the game.

Screenshots

One value zero Both values zero Both values non-zero
onezero bothzero nonzero

@jamesmockett jamesmockett self-assigned this Mar 20, 2026
@github-actions
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@jamesmockett jamesmockett added the fix Departmental tracking: fix label Mar 20, 2026
@jamesmockett jamesmockett linked an issue Mar 20, 2026 that may be closed by this pull request
@jamesmockett jamesmockett added the run_chromatic Runs chromatic when label is applied label Mar 20, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Departmental tracking: fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Match stats render incorrectly when both values are zero

1 participant