Widgets.us.season.nhl.PlayersStats

A us.season.nhl.playersStats displays NHL seasonal players statistics.

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


new PlayersStats(props)

props.skaterColumns options descriptions

optiondescription
gpGames Played
gGoals
aAssists
pPoints
pmPlus Minus
pimPenalty Minutes
ppgPower Play Goals
shgShort Handed Goals
sogShots (on Goal)
spShooting Percentage
toigpTime On Ice per Game
shiftsgpShifts per Game
fowpFaceoff Win Percentage

props.goalieColumns options descriptions

optiondescription
gpGames Played
wWins
lLosses
otlOvertime Losses
gaGoals Against
gaaGoals Against Average
saShots Against
sSaves
svpSave %
shoShutouts
toiTime On Ice
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

category string <optional>
'skater'

Statistics mode: skater / goalie.

conference string <optional>

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

uniqueTeamId number <optional>

Unique team id filter.

qualifiesAsLeagueLeader boolean <optional>
true

When set to true, enables statistical minimums to qualify a player for inclusion in a statistical category.

disableTitle boolean <optional>

When set to true, hides widget title.

hideFilters boolean <optional>

When set to true, hides all filters / dropdown.

skaterColumns string <optional>

Comma separated string of skater table statistics column keys. Used for picking picking fewer columns and different order. Valid options are gp, g, a, p, pm, pim, ppg, shg, sog, sp, toigp, shiftsgp, fowp.

goalieColumns string <optional>

Comma separated string of goalie table statistics column keys. Used for picking picking fewer columns and different order. Valid options are gp, w, l, otl, ga, gaa, sa, s, svp, sho, toi.

skaterSortIdx string <optional>

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

goalieSortIdx string <optional>

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

pageLength number <optional>
50

How many players display per page.

border boolean <optional>

When set to true, table is displayed with border.

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.nhl.playersStats"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/msn/en_us/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.playersStats', {});
</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.playersStats', {onItemClick: function(type, obj){alert('playerId: ' + playerId + ', uniqueTeamId: ' + obj.uniqueTeamId);}});
</script>
<div id="sr-widget"></div>