accepted

Formation player names render in a below-marker pill, never inside the glyph

The marker glyph holds only the jersey number, initials, or position code. Full names render in a rounded pill below the marker when `showNames: true`. This keeps markers legible across long or multilingual names without clipping, and preserves a readable glyph even when the name pill is off.

Formation visual-encodingaccessibilitydefault-behaviour

Context

Formation markers are small — a 4-3-3 on a half-pitch at broadcast size puts each player in a ~40px disc. Fitting “Trincão” or “Chukwuemeka” inside a disc needs type compression that makes the chart read as pixelated. Other libraries handle this by hover-only tooltips, which fails accessibility (names aren’t legible without interaction) and fails static export (hover doesn’t serialise).

Decision

Two layers, never merged:

  • Glyph — jersey number if present, else initials, else position code (GK, CB, LB…). Always fits inside the marker. labelStrategy: "auto" resolves the priority; "number", "initials", "position" are explicit.
  • Name pill — rounded-rect pill beneath the marker, visible when showNames: true. Background + text colour resolve from theme; can handle the longest realistic name without pushing into the next player’s row.

Omitting the pill (showNames: false) still leaves a readable glyph.

Consequences

  • Multilingual and long names are a non-issue; the pill sizes to content.
  • Accessibility tree exposes both the glyph label and the pill name, so screen readers read “number 7, Saka” rather than “number 7” alone.
  • Static export always serialises glyph + pill as two visual layers; no hover-dependent text.
  • Decorations around the glyph (captain armband, sub marker) compose via markerComposition, which targets the glyph layer — the name pill is not customisable via composition.
← All decisions