Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
|
|
Sets the selected year.
|
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.
|
rankingsTypeSelected |
string
|
<optional>
|
null
|
Sets the default selected item in the left dropdown. Legal values are:
- scoring_rank
- team_rankings_offense
- team_rankings_defense
- individual_rankings
If this props is set to null the default selection is scoring_rank .
|
metricSelected |
string
|
<optional>
|
null
|
Sets the default selected metric by which the rank is determined. The available
legal options depend on the rankingsTypeSelected prop.
Legal values if rankingsTypeSelected is:
-
scoring_rank :
(special case: in this case there is no lower menu and thus this prop is ignored)
-
team_rankings_offense :
- points
- rushing_yards
- passing_yards
- time_of_possession
- turnovers_allowed
- interceptions_allowed
- sacks_allowed
-
team_rankings_defense :
- points_allowed
- rushing_yards_allowed
- passing_yards_allowed
- time_of_possession_allowed
- forced_fumbles
- interceptions
- sacks
-
individual_rankings :
- passing_yards
- passing_touchdowns
- pass_completions
- pass_receptions
- receiving_touchdowns
- run_after_catch
- rushing_yards
- rushing_touchdowns
- yards_per_carry
- carries
- lost_fumbles
- forced_fumbles
- thrown_interceptions
- interceptions
- tackles
- assists
- sacks
If this props is set to null the default selection is the first item of the list depending on the rankingsTypeSelected prop
|
enablePlayerSelect |
boolean
|
<optional>
|
false
|
Enables player selection. Interactive areas are:
- player row if
Individual rankings is selected in the appropriate dropdown
PlayerId is emitted on click or touch.
|
enableTeamSelect |
boolean
|
<optional>
|
false
|
Enables team selection. Interactive areas are:
- team row if either
Sportradar scoring rank or Team rankings - offense or Team rankings - defense is selected in hte appropriate dropdown
- team crest if
Individual rankings is selected in hte appropriate dropdown
TeamId 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.season.rankings" data-sr-season-id="2015"></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.season.rankings', {seasonId: 2015});
</script>
<div id="sr-widget"></div>