Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
|
|
Sets the selected year.
|
teamId |
string
|
<optional>
|
null
|
Sets the selected team. If this is set to null the alphabetically first team of the NFC that played in the selected time will be selected.
|
position |
string
|
<optional>
|
null
|
Sets the position of the opposing teams. Valid values are:
quarterbacks
running_backs
wide_receivers
tightends
If this is null the default selection will be quarterbacks .
|
seasonType |
string
|
<optional>
|
null
|
Sets the selected season type, possible values are pre , reg , post . If this prop is null the season type of the currently active week of the specified seasonId will be used.
|
week |
number
|
<optional>
|
null
|
Sets the selected week number. The legal number depend on the value of seasonType .
-
if
seasonType is set to pre : valid values are 0 - 4
-
if
seasonType is set to reg : valid values are 1 - 17
-
if
seasonType is set to post : valid values are 1 - 5
If this prop is null the season type of the currently active week of the specified seasonId will be used.
|
disableWidgetHeader |
boolean
|
<optional>
|
false
|
When set to true , hides widget header.
|
selectedUpperTab |
string
|
<optional>
|
null
|
Changes the default active tab in the first row of tabs. The
legal inputs depend on the default selected position . If position is not provided the default is
quarterbacks . The legal input for the different positions are:
-
quarterbacks :
- passing_touchdowns
- passing_interceptions
- passing_yards
- passing_completions
- passing_attempts
- passing_cmp_pct
-
running_backs :
- rushing_attempts
- rushing_yards
- rushing_touchdowns
-
wide_receivers :
- rushing_attempts
- rushing_yards
- rushing_touchdowns
-
tightends :
- receiving_receptions
- receiving_yards
- receiving_touchdowns
- receiving_targets
If this prop is null the first tab for the appropriate position will be set.
|
selectedLowerTab |
string
|
<optional>
|
null
|
Changes the default active tab in the second row of tabs. This row isn't
always available depending on the selected position . If position is not provided the default is
quarterbacks . The available inputs (depending on the value set for position) are:
-
quarterbacks :
- rushing_attempts
- rushing_yards
- rushing_touchdowns
-
running_backs :
- receiving_receptions
- receiving_yards
- receiving_touchdowns
- receiving_targets
-
wide_receivers :
- receiving_receptions
- receiving_yards
- receiving_touchdowns
- receiving_targets
-
tightends :
no second row of tabs
If this prop is null the first tab for the appropriate position will be set.
|
enableTeamSelect |
boolean
|
<optional>
|
false
|
Enables team selection. Interactive areas are:
TeamId is emitted on changing the item in the dropdown.
|
onTrack |
function
|
<optional>
|
|
Function/event handler, see Widgets.onTrack
|
border |
boolean
|
<optional>
|
|
If true , it draws a border around widget.
|
|
Examples
HTML/Declarative
<div class="sr-widget" data-sr-widget="us.season.nfl.matchup" data-sr-season-id="2015"></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.season.nfl.matchup', {seasonId: 2015});
</script>
<div id="sr-widget"></div>