Parameters
Name |
Type |
Description |
props |
object
|
Properties
Name |
Type |
Argument |
Default |
Description |
seasonId |
number
|
<optional>
|
|
Year (e.g. 2019) or Fishnet Season Id (e.g. 63509 for 2019) of regular sequence (i.e. unique tournament id 31).
|
category |
string
|
<optional>
|
'passing'
|
Statistics mode, one of: offense , offenseAdvanced , defense1 , defense2 , defenseAdvanced .
|
conference |
string
|
<optional>
|
'all'
|
Filter teams by conference. Valid options are: all , afc , nfc .
|
seasonType |
string
|
<optional>
|
'regular'
|
Season type. Valid options are: regular , playoffs .
|
border |
boolean
|
<optional>
|
|
When set to true , table is displayed with border.
|
pageLength |
number
|
<optional>
|
50
|
How many players display per page.
|
disableTitle |
boolean
|
<optional>
|
|
When set to true , hides widget title.
|
hideFilters |
boolean
|
<optional>
|
|
When set to true , hides all filters / dropdown.
|
offenseColumns |
string
|
<optional>
|
|
Comma separated string of pitching table statistics column keys. Used for picking picking fewer columns and different order. Valid options are pf , pfg , tot_yds , tot_ydsg , pass_yds , pass_ydsg , rush_yds , rush_ydsg .
|
offenseAdvancedColumns |
string
|
<optional>
|
|
Comma separated string of pitching table statistics column keys. Used for picking picking fewer columns and different order. Valid options are ppd , rz_td_pct , rz_score_pct , rz_tot_drives , two_pt_conv_pct , pass_pct , rush_pct , to_diff , bppg .
|
defense1Columns |
string
|
<optional>
|
|
Comma separated string of pitching table statistics column keys. Used for picking picking fewer columns and different order. Valid options are pa , pag , tot_yds_allwd , tot_yds_g_allwd , def_pass_yds , def_pass_yds_g , rush_yds_allwd , def_rush_yds_g .
|
defense2Columns |
string
|
<optional>
|
|
Comma separated string of pitching table statistics column keys. Used for picking picking fewer columns and different order. Valid options are def_sacks , def_sacks_yds , ff , pass_def , def_int , int_yds , int_td , safety , tot_tacks , tfl , qbh .
|
defenseAdvancedColumns |
string
|
<optional>
|
|
Comma separated string of pitching table statistics column keys. Used for picking picking fewer columns and different order. Valid options are def_miss_tacks , def_miss_tacks_pct , def_hurries , def_koncks , def_blitz_pct , def_third_pct .
|
offenseSortIdx |
string
|
<optional>
|
|
Overrides pitching table default sort statistics column index. 1, 2, 3...
|
offenseAdvancedSortIdx |
string
|
<optional>
|
|
Overrides pitching table default sort statistics column index. 1, 2, 3...
|
defense1SortIdx |
string
|
<optional>
|
|
Overrides pitching table default sort statistics column index. 1, 2, 3...
|
defense2SortIdx |
string
|
<optional>
|
|
Overrides pitching table default sort statistics column index. 1, 2, 3...
|
defenseAdvancedSortIdx |
string
|
<optional>
|
|
Overrides pitching table default sort statistics column index. 1, 2, 3...
|
onItemClick |
function
|
<optional>
|
|
Function/event handler. Emits playerId , uniqueTeamId , seasonId , uniqueTournamentId on table row click or touch.
|
|
Examples
HTML/Declarative
<div class="sr-widget" data-sr-widget="us.season.nfl.teamsStats" data-sr-season-id="2019"></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.teamsStats', {});
</script>
JS/Example of using Event Handler
<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.teamsStats', {seasonId:'63509', onItemClick: function(type, obj){alert(type +': ' + JSON.stringify(obj));}});
</script>