Widgets.us.season.ncaab.TeamStatsGraphic

us.season.ncaab.teamStatsGraphic visualizes relevant season statistic categories with season min and max for selected team.

For the widget to render you need to provide seasonId.


new TeamStatsGraphic(props)

Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
seasonId number

Season id. It implies initial selection of season dropdown and listed teams in teams dropdown. seasonId from regular season sequence will preselect "Regular season" dropdown item, seasonId from playoffs season sequence will preselect "Postseason" dropdown item, and both would fully list available teams. However, setting seasonId from NCAA March Madness season sequence will preselect "Postseason" and list only teams participating in seasonId implied NCAA March Madness tournament. Similarly at NIT, CBI, CIT and Vegas season sequences.

teamUid number <optional>

Selected unique team id. If teamUid is not among seasonId implied teams, the first team on the list gets pre-selected.

division string <optional>
'dI'

Selected division. The team dropdown is populated with teams that belong to the specified division. If teamUid is provided, then this team's division overrides division.

mode string <optional>
'pergame'

Display mode. Selects the type of statistics that is displayed, either pergame or totals.

disableTeamDropdown boolean <optional>

If true hides the team dropdown. If then teamUid is set, and it is not among seasonId implied teams, no data error is displayed. Using seasonId from regular and/or playoffs season sequences reduces the likelihood of this.

disableModeDropdown boolean <optional>

If true hides the mode dropdown.

disableSeasonDropdown boolean <optional>

If true hides the season dropdown.

disableDropdown boolean <optional>

If true hides all 3 dropdowns.

border boolean <optional>

If true enables a border around the widget.

onItemClick function <optional>

Function/event handler. Emits uniqueTeamId on team dropdown change.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.season.ncaab.teamStatsGraphic" data-sr-season-id="57130"></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.ncaab.teamStatsGraphic', {seasonId: 57130});
</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.ncaab.teamStatsGraphic', {seasonId: 57130, teamUid: 34641, onItemClick: function(type, obj){alert('uniqueTeamId: ' + obj.uniqueTeamId);}});
</script>
<div id="sr-widget"></div>