Widgets.nfl.game.TeamLeaders

Widget nfl.game.teamLeaders shows the stats of the players for both teams playing in the match.

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


new TeamLeaders(props)

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

Match Id.

disableWidgetHeader boolean <optional>
false

When set to true, hides widget header.

disableMatchHeader boolean <optional>
false

When set to true, hides match header.

collapseGameInformation boolean <optional>
true

When set to false, opens the game information section

homeStats string <optional>
null

Home stats dropdown starting position, legal values are:

  • overview
  • complete
, the default selection if this prop is null is overview

awayStats string <optional>
null

Away stats dropdown starting position, legal values are:

  • overview
  • complete
, the default selection if this prop is null is overview

selectedTeam string <optional>
null

Selected team on mobile responsive design, legal values are:

  • home
  • away
, the default selection if this prop is null is home

useTeamColors boolean <optional>
null

Valid values are:

  • null (the default) = settings from the client configuration are used. If the client is configured to use team colors, then the theme can be overriden with the teamColorsTheme parameter.
  • true = team colors will be used, as specified with the teamColorsTheme parameter. If the teamColorsTheme is not specified and the client configuration does not specify a team colors theme, or if the teamColorsTheme contains an invalid theme name, then team colors will not be used.
  • false = team colors will not be used.
teamColorsTheme string <optional>
null

When set (and not disabled by useTeamColors), specifies the name of the formula to calculate team colors (e.g. mono-team-colors-light).

enableTeamSelect boolean <optional>
false

When set to true enable team selection. Interactive areas are:

  • team name and crest in a match header,
  • rows in the scoring table of the match header,
  • dropdown items switching between overview nad complete stats,
  • player rows in the statistics
TeamId is emitted on click or touch, except for the dropdown where changing the selected item triggers emitting the id.

enablePlayerSelect boolean <optional>
false

When set to true enable player selection. Interactive areas are:

  • player rows in the statistics.
PlayerId is emitted on click or touch.

onTrack function <optional>

Function/event handler, see Widgets.onTrack.

Examples

HTML/Declarative

<div id="sr-widget" data-sr-widget="nfl.game.summary" data-sr-match-id="sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/sportradar/widgetloader" 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/sportradar/widgetloader","USW", {
        language: 'en'
    });
    USW('addWidget', '#sr-widget', 'nfl.game.teamLeaders', {matchId: 'sd:match:2724b0ed-71b1-4c35-a977-087f4f9404f4'});
</script>
<div id="sr-widget"></div>