accepted

PizzaChart slice length is always percentile; raw values never drive geometry

Slice radius reads as percentile against the declared cohort. Raw metric values (xG, progressive passes, tackles) pass through to tooltips and labels but never set the wedge geometry. Consumers who need raw-scale polar charts pick a different primitive.

PizzaChart chart-apifootball-semanticsdata-integrity

Context

Scouting-style pizza and radar charts are a percentile idiom. The editorial read — “top 10%, bottom 25%, average” — is only meaningful against a declared cohort, and mixing percentile and raw scales inside one chart invites misreading. Consumers arriving from generic charting libraries may assume a pizza chart with value: 42 renders a 42-unit slice; it doesn’t.

Decision

Input rows carry percentile: number (0..100). Raw values live under raw and surface in tooltips and labels. Compute rejects rows with a percentile outside [0, 100] (emits [pizza.invalid-percentile]) and rejects rows with no percentile (emits [pizza.missing-percentile]). raw-only inputs with no percentile are skipped; there is no automatic “rank-in-place” fallback.

Consequences

  • Percentile computation lives in the scouting / adapter layer, where the cohort is explicit.
  • Tooltips show both raw and percentile so analysts don’t lose the underlying value.
  • Category colouring and grouping (attack / defend / possession) still apply; the decision is about geometry only.
  • Consumers building a polar chart of raw metrics (e.g. compass of raw xG distribution) use a different chart or write a recipe that pre-ranks their rows — the chart refuses to guess.
← All decisions