PitchKit
API Reference@pitchkit/reactInterfaces

RaceChartProps

Defined in: packages/react/src/race-types.ts:50

Type Parameters

Type Parameter
T

Properties

PropertyModifierTypeDescriptionDefined in
appearance?readonlyRaceAppearance-packages/react/src/race-types.ts:85
aspectRatio?readonlynumberShape of the responsive box. Default 2, or 1.4 below 420px widepackages/react/src/race-types.ts:82
children?readonlyReactNodeAnnotations, positioned through useRaceChart().packages/react/src/race-types.ts:90
className?readonlystring-packages/react/src/race-types.ts:88
emphasise?readonlyAccessor<T, boolean>Drawn with the larger ringed marker. For an xG race, pass isGoal.packages/react/src/race-types.ts:67
endTime?readonlynumberWhere the last period ends, in match minutes. Defaults to its nominal end (90, or 120 after extra time), or later if its data runs on. Data after an explicit endTime is dropped, from the line and the total.packages/react/src/race-types.ts:74
height?readonlynumber-packages/react/src/race-types.ts:80
maxValue?readonlynumberTop of the y-axis. Defaults to a round ceiling above the highest total.packages/react/src/race-types.ts:76
padding?readonlyChartPadding-packages/react/src/race-types.ts:83
periodreadonlyAccessor<T, number>The period the datum is in: 1 for the first half, 2 for the second, 3 and 4 for extra time. StatsBomb's period is already this. Required because minutes restart at 45 for the second half: a minute like 46' is in both halves when the first had stoppage time. Each period is drawn after the one before it, as wide as its own minutes. A datum without a whole-number period from 1 is dropped.packages/react/src/race-types.ts:63
seriesreadonlyreadonly RaceSeries<T>[]-packages/react/src/race-types.ts:51
timereadonlyAccessor<T, number>Match minute, as the feed numbers it. Fractional is fine — (s) => s.minute + s.second / 60.packages/react/src/race-types.ts:53
tooltip?readonly(rows, time, period) => ReactNodeReplaces the default crosshair tooltip body. period is 1 for the first half.packages/react/src/race-types.ts:87
valuereadonlyAccessor<T, number>The quantity that accumulates. For an xG race, the shot's xG.packages/react/src/race-types.ts:65
width?readonlynumberFixed pixel size — the opt-out from the responsive default. Provide both, or neither.packages/react/src/race-types.ts:79

On this page