Widgets.us.player.mlb.CareerStats

A us.player.mlb.CareerStats displays mlb seasonal teams statistics table.

For the widget to render you need to provide playerId.


new CareerStats(props)

props.hitterColumns options descriptions

optiondescription
gpMlb Trans Games Played
gsGames Started
paPlate Appearances
abat Bats
rRuns
hHits
2bDoubles
3bTriples
hrHome Runs
rbiRuns Batted In
bbWalks
kStrikeouts
sbStolen Bases
csCaught Stealing
baBatting Average
obpOn Base %
slgSlugging %
opsOn-base Plus Slugging
isoIsolated Power
babipBatting Average On Balls In Play
bbkWalk-to-strikeout Ratio
gofoGround Out-Fly Out Ratio
goaoGround Ball-Air Out Ratio
xbhExtra-base Hits
abhrat Bats per Home Run

props.pitcherColumns options descriptions

optiondescription
gpMlb Trans Games Played
gsGames Started
wWins
lLosses
eraEarned Run Average
svSaves
svoSave Opportunities
ipInnings Pitched
hHits Allowed
rRuns Allowed
erEarned Runs
hraHome Runs Allowed
bbWalks
kStrikeouts
obaOpponents' Batting Average
whipWalks and Hits per Inning Pitched
k9Strikeouts per Nine Innings
kbbStrikeout-to-walk Ratio
goaoGround Ball-fly Ball Ratio
qsQuality Starts
cgComplete Games
shoShutouts
hldHolds
Parameters
Name Type Description
props object
Properties
Name Type Argument Default Description
seasonId number <optional>

Player Id.

seasonDefaultSortDirection string <optional>
'asc'

Sets initial season column sort direction. Valid options are asc and desc...

hitterColumns string <optional>

Comma separated string of hitter table statistics column keys. Used for picking picking fewer columns and different order. Valid options are gp, gs, pa, ab, r, h, 2b, 3b, hr, rbi, bb, k, sb, cs, ba, obp, slg, ops, iso, babip, bbk, goao, xbh, abhr.

pitcherColumns string <optional>

Comma separated string of pitcher table statistics column keys. Used for picking picking fewer columns and different order. Valid options are gp, gs, w, l, era, sv, svo, ip, h, r, er, hra, bb, k, oba, whip, k9, kbb, goao, qs, cg, sho, hld.

disableTotalRow boolean <optional>

When set to true, disables the table total row.

hideBlankSeasons boolean <optional>

When set to true, hides blank season rows.

border boolean <optional>

When set to true, table is displayed with border.

Examples

HTML/Declarative

<div class="sr-widget" data-sr-widget="us.player.mlb.careerStats" data-sr-player-id="842173"></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.player.mlb.careerStats', {playerId: '842013'});
</script>
<div id="sr-widget"></div>