Widgets.us.season.nhl.TeamsStats

A us.season.nhl.playersStats displays NHL seasonal teams statistics table.

All the properties are optional. By default, widget will render player statistics table for the active season.


new TeamsStats(props)

props.columns options descriptions

optiondescription
gpGames Played
wWins Total
lLosses Total
otlOvertime Losses Total
ptsPoints
ppPoints %
gGoals
aAssists
sogShots (on Goal)
pimPenalty Minutes
gaOpponents Goals
shoShutouts
sowinsTeam Shootout Wins
gfgpGoals for per Games Played
gagpGoals Against per Games Played
pppPowerplay Conversion %
pkpPenalty Kill %
Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
seasonId number <optional>

Season Id.

seasonType string <optional>
'regular'

Season type: regular / playoffs

conference string <optional>

Conference filter: eastern / western, except for the 2020/21 season the division names are used instead: central, east, north, west.

border boolean <optional>

When set to true, table is displayed with border.

disableTitle boolean <optional>

When set to true, hides widget title.

hideFilters boolean <optional>

When set to true, hides all filters / dropdown.

columns string <optional>

Comma separated string of table statistics column keys. Used for picking picking fewer columns and different order. Valid options are gp, w, l, otl, pts, pp, g, a, sog, pim, ga, sho, sowins, gfgp, gagp, ppp, pkp.

sortIdx string <optional>

Overrides table default sort statistics column index. 1, 2, 3...

onItemClick function <optional>

Function/event handler. Emits uniqueTeamId, seasonId, uniqueTournamentId on table row click or touch.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.season.nhl.teamsStats"></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.nhl.teamsStats', {});
</script>
<div id="sr-widget"></div>

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.nhl.teamsStats', {onItemClick: function(type, obj){alert('uniqueTeamId: ' + obj.uniqueTeamId);}});
</script>
<div id="sr-widget"></div>