---
title: "Ball Possession"
canonical_url: "https://apidocs.sportradar.com/resources/widgets/docs/widgets/match/ball-possession"
markdown_url: "https://apidocs.sportradar.com/resources/widgets/docs/widgets/match/ball-possession.md"
last_updated: "2026-03-26T13:44:48Z"
---

# Ball Possession

**Ball Possession** widget displays comprehensive possession statistics for soccer matches, combining overall ball possession percentages with territorial control visualization. The widget offers two presentation modes for possession data (circular chart or line chart over time) and includes a pitch-based visualization showing the distribution of play across defensive, attacking, and dangerous attacking zones. It provides real-time insights into which team controls the ball and where on the pitch that control is being exercised, helping users understand match dynamics, tactical approaches, and team dominance patterns. The widget is soccer-specific and designed for live match analysis platforms.

![Default View](https://apidocs.sportradar.com/resources/widgets/static/img/match/ball-possession/default_view_carousel.png)

Shows the default view of the Match Ball Possession widget.

![Only Pitch Statistics](https://apidocs.sportradar.com/resources/widgets/static/img/match/ball-possession/only_pitch_statistics_carousel.png)

Shows only pitch statistics, hiding other ball possession details.

See the [Ball Possession widget demo](https://widgets.sir.sportradar.com/widgets-demo#widget:\(name:match.ballPossession\)).

## API Reference

### Required Parameters

- **widget-name**: `match.ballPossession`
- **matchId**: The unique identifier for the match is the only required parameter. See [Getting Identifiers](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md)

**Environment Requirements**

## Technical Requirements:

- JavaScript enabled
- XMLHttpRequest support for data fetching
- CSS3 support for styling and animations

**Supported Sports**

The Ball Possession widget supports the following sports:

| Sport         | Sport ID |
| ------------- | -------- |
| Soccer        | 1        |
| Esport Soccer | 137      |

| Property                 | Type      | Default      | Description                                                                                                                                                                                                                                                                |
| ------------------------ | --------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `matchId`                | `number`  | **Required** | The unique identifier for the match.<br><br>See [Getting Identifiers](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/getting-identifiers.md)                                                                                                              |
| `disableWidgetHeader`    | `boolean` | `false`      | When `true`, hides the tournament context header showing competition name, date, and venue information.                                                                                                                                                                    |
| `disableMatchHeader`     | `boolean` | `true`       | When `true`, hides the match team header displaying team crests, names, and current score. Default is `true` assuming widget is embedded in match context.                                                                                                                 |
| `disableBallPossession`  | `boolean` | `false`      | When `true`, hides the overall possession chart (circular or line). Automatically set to `true` if possession data unavailable. When both possession and pitch stats are disabled, widget shows error.                                                                     |
| `disablePitchStatistics` | `boolean` | `false`      | When `true`, hides the pitch-based territorial control visualization. Automatically set to `true` if territorial statistics unavailable. When both possession and pitch stats are disabled, widget shows error.                                                            |
| `disablePlayDirection`   | `boolean` | `false`      | When `true`, hides the directional arrows on pitch visualization indicating which direction each team is attacking. Useful for simplified visualization or when attacking direction is obvious from context.                                                               |
| `enableEmptyState`       | `boolean` | `false`      | When `true`, widget displays empty/placeholder state instead of error when statistics are not yet available (typically pre-match or early in match). Forces both possession and pitch components to render with neutral values.                                            |
| `layout`                 | `string`  | `"circular"` | Possession chart visualization style. <ul><li>`"circular"`: Dual arc circular progress chart showing possession split with team crests and percentages</li><li>`"line"`: Time-series line graph tracking possession percentage changes throughout match timeline</li></ul> |

## Main Configurable Features

Illustrations of main feature variants with relevant property values below.

**Default View**

Shows the default view of the Match Ball Possession widget.

![Default View](https://apidocs.sportradar.com/resources/widgets/static/img/match/ball-possession/default_view.png)

**Sample Configuration:**

- matchId: `string|number`

**Only Pitch Statistics**

Shows only pitch statistics, hiding other ball possession details.

![Only Pitch Statistics](https://apidocs.sportradar.com/resources/widgets/static/img/match/ball-possession/only_pitch_statistics.png)

**Sample Configuration:**

- disableBallPossession: `true`

See [Ball Possession widget demo](https://widgets.sir.sportradar.com/widgets-demo#widget:\(name:match.ballPossession\))

## Integration Examples

### Property Name Transformations

Properties do not always transfer from the above table directly into integration code. Properties must be transformed differently for each integration method:

#### JavaScript/Programmatic Integration

- Property names remain unchanged in camelCase
- Properties become members of the 4th parameter object in `SIR()` call
- Example: `cardVariant: "compact"`

> **Info**
>
> In javascript integration, the properties go into an object which is passed as the 4th argument of the call ti `SIR()` function. Please see  [Global SIR API](https://apidocs.sportradar.com/resources/widgets/docs/tutorials/SIR.md)

#### HTML/Declarative Integration

- Convert camelCase to lowercase with dashes, e.g. cardVariant becomes card-variant
- Add `data-sr-` prefix
- Example: `cardVariant` → `data-sr-card-variant`
- Example: `filters.sport.hidden` → Complex objects must be passed as JSON strings

> **Info**
>
> In HTML integration, the properties go into the parent HTML object as object properties, prefixed with `data-sr-` as explained above.

> **Only base property support**
>
> This method supports only simple (base) properties and does not support properties that require functions.

> **Info**
>
> In all examples replace `sportradar` in the widgetloader URL path with your clientId.
>
> Example if your clientId is `client1`:
>
> - This URL: `https://widgets.sir.sportradar.com/sportradar/widgetloader`
> - becomes: `https://widgets.sir.sportradar.com/client1/widgetloader`

**Default View**

### JavaScript (Programmatic)

Initialize the widget programmatically using the JavaScript API. The widget renders in the specified container element.

```js
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
    language: 'en'
});

SIR('addWidget', '#sr-widget', 'match.ballPossession', {
    matchId: 123
});
```

```html
<div id="sr-widget"></div>
```

### HTML (Declarative)

Insert the following HTML code at the target widget location. Complex object properties must be passed as JSON-encoded strings.

```html
<div id="sr-widget"
        data-sr-widget="match.ballPossession"
        data-sr-match-id="123">
</div>
<script type="application/javascript"
        src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
        async>
</script>
```

**Only Pitch Statistics**

### JavaScript (Programmatic)

Initialize the widget programmatically using the JavaScript API. The widget renders in the specified container element.

```js
(function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
)})(window,document,"script","https://widgets.sir.sportradar.com/sportradar/widgetloader","SIR", {
    language: 'en'
});

SIR('addWidget', '#sr-widget', 'match.ballPossession', {
    disableBallPossession: true
});
```

```html
<div id="sr-widget"></div>
```

### HTML (Declarative)

Insert the following HTML code at the target widget location. Complex object properties must be passed as JSON-encoded strings.

```html
<div id="sr-widget"
        data-sr-widget="match.ballPossession"
        data-sr-disable-ball-possession="true">
</div>
<script type="application/javascript"
        src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
        async>
</script>
```
