Widgets.us.match.GeneralStatistics

A us.match.generalStatistics brings general statistics such as ball possession, shots on target, shots of target, yellow and red cards, free kicks, offsides, fouls, substitutions, etc. Supported sports are NBA and Soccer.

For the widget to render you need to provide matchId, other properties are optional.


new GeneralStatistics(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
matchId number

Match ID.

disableWidgetHeader boolean <optional>
false

When set to true, hides widget header.

disableMatchHeader boolean <optional>
false

When set to true, hides match header.

disablePeriods boolean <optional>
false

When set to true, hides periods tabs.

disableCharts boolean <optional>
false

When set to true, hides statistics charts.

disableGroups boolean <optional>
false

When set to true, hides statistics groups.

chartType string <optional>
bar

Display mode of charts. Possible options: bar, bullet.

layout string <optional>
normal

When set to compact, switches to compact display. Possible options: normal, compact.

visibleStats array <optional>
[]

When set to non-empty value, it only displays statistics types specified in the array (if they are available for selected match).

Possible options:
`ball_possession`,
`dangerous_attack`,
`attack`,
`ball_safe`,
`goal_attempts`,
`shot_on_target`,
`shot_off_target`,
`corner_kick`,
`free_kick`,
`offside`,
`goal_kick`,
`thown_in`,
`yellow_card`,
`yellow_red_card`,
`red_card`,
`player_substitution`,
`save`,
`fouls`,
`injury`
`free_throws`,
`two_points`,
`three_points`,
`success_attempts`,
`max_points_in_a_row`,
`rebounds`,
`biggest_lead`,
`lead_changes`,
`time_spent_in_lead`,
`timeouts`.

Stats are ordered as in `visibleStats` prop but grouped inside their respective groups.

When `disableGroups` is set to `true`, order of stats is the same as specified in `visibleStats` prop.

onTrack function <optional>

Function/event handler, see Widgets.onTrack.

border boolean <optional>

When set to true, draws border.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.match.generalStatistics" data-sr-match-id="20064536"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/uscommon/widgetloader" data-sr-language="en_us" async></script>

JS/Programmatic

<script>
    (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.media.sportradar.com/uscommon/widgetloader","USW", {
        language: 'en_us'
    });
    USW('addWidget', '#sr-widget', 'us.match.generalStatistics', {matchId: 20064536});
</script>
<div id="sr-widget"></div>