Widget Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Widget Docs

Top Teams

us.season.mlb.topTeams provides a team leaderboard for a selected statistic and season.

For the widget to render you must provide a valid seasonId.

Parameters

Name Type Description
props object properties
Name Type Argument Default Description
seasonId number required Season ID
seasonType string optional 'regular' Season type. Valid options are: regular or playoffs.
conference string optional 'all' Selected conference. Can be al, nl or undefined (i.e. all).
statType string optional 'points' Selected Stat. See below for valid options.
disableDropdown boolean optional If true hides dropdown.
teamsLimit number optional 5 Limits list length.
border boolean optional If true enables a border around the widget.
onItemClick function optional Function/event handler. Emits event on team row click or touch.

List of valid stat keys:

Option Description
hitting_at_bats_per_homerun At Bats per Home Run (Hitting)
hitting_batting_average Batting Average
hitting_doubles Doubles
hitting_extra_base_hits Extra Base Hits
hitting_hits Hits
hitting_home_runs Home Runs
hitting_isolated_power Isolated Power
hitting_on_base_percentage On Base Percentage
hitting_on_base_percentage_plus_slugging OPS (On Base + Slugging Percentage)
hitting_runs_batted_in Runs Batted In
hitting_slugging_percentage Slugging Percentage
hitting_triples Triples
hitting_walks_per_strikeout Strikeout to Walk Ratio (Hitter)
hitting_ground_out_to_fly_out_ratio Groundout to Fly Out Ratio (Hitter)
hitting_ground_out_to_air_out_ratio Groundout to Air Out Ratio (Hitter)
pitching_overall_complete_games Complete Games
pitching_overall_earned_run_average ERA (Earned Run Average)
pitching_overall_opponents_batting_average Opponent Batting Average
pitching_overall_quality_starts Quality Starts
pitching_overall_shutouts Shutouts
pitching_overall_strikeouts_per_9_innings Strikeouts Per 9 Innings
pitching_overall_strikeouts_per_walk Strikeout to Walk Ratio (Pitcher)
pitching_overall_total_strikeouts Strikeouts
pitching_overall_walks Walks
pitching_overall_walks_plus_hits_per_innings_pitched WHIP (Walks + Hits Per Innings Pitched)
pitching_overall_ground_out_to_fly_out_ratio Groundout to Fly Out Ratio (Pitcher)
pitching_overall_ground_out_to_air_out_ratio Groundout to Air Out Ratio (Pitcher)

Examples

<div class="sr-widget" data-sr-widget="us.season.mlb.topTeams" data-sr-season-id="38836"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>
<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/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.mlb.topTeams', {seasonId: 38836, statType: 'hitting_batting_average'});
</script>
<div id="sr-widget"></div>
<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/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.mlb.topTeams', {seasonId: 38836, statType: 'pitching_overall_earned_run_average', teamsLimit: '10', onItemClick: function(type, obj){alert('uniqueTeamId: ' + obj.uniqueTeamId);}});
</script>
<div id="sr-widget"></div>