Widget elements
Widget elements define the visual features of your widget. The following table breaks these down. Elements can either be prematch (data you can see before a match starts), live (data you see while a match is ongoing) or postmatch (results composed from a complete match). The following table visualizes your options.
Constant | Title | Widget types | Widget type | Description |
---|---|---|---|---|
'PrematchStreaks' | CS2, DOTA | m, c, sm, t | prematch | Latest win lost streaks. |
'PrematchMapVotes' | CS2 | m, c, sm, t | prematch | CS map votes before a match starts. |
'PrematchPastMatches' | CS2, DOTA | m, c, sm, t | prematch | Past head to heads of the competing teams. |
'PrematchRoster' | CS2, DOTA | m, c, sm, t | prematch | Current known team roster. |
'PrematchPlayerPerformance' | CS2, DOTA | m, c, sm, t | prematch | Historical player stats averages from recently recorded matches. |
'PrematchTeamPerformance' | CS2, DOTA | m, c, sm, t | prematch | Historical team stats averages from recently recorded matches. |
'PrematchMapWinPercentage' | CS2 | m, c, sm, t | prematch | Map win percentage calculated from the last 6 months. |
'RoundScore' | CS2 | m, c, sm, t | live | In game round score. |
'HorizontalTimeline' | CS2, DOTA | m, c, sm, t | live | Horizontal timeline view of important in game events. |
'Timeline' | CS2, DOTA | sm | live | Vertical timeline of in game events. |
'RealtimeMap' | CS2, DOTA | m, c, t | live | In game map and timeline in a tabbed view. |
'RealtimeMapAndVideo' | CS2, DOTA | m, c, t | live | In game map, live stream and timeline in a tabbed view. (betting clients only) |
'PlayerStats' | CS2, DOTA | m, c, sm, t | live | In game player stats. |
'PlayerStatsTable'* | CS2, DOTA | m, c, sm, t | live | Player stats as a table view. |
'TeamStats' | CS2, DOTA | m, c, sm, t | live | In game team stats. |
'Bans' | DOTA | m, c, sm, t | live | Banned heros from draft phase. |
'MapName' | CS2 | m, c, sm, t | live | CS map name and current map score. |
'Map' | CS2, DOTA | sm | live | In game map view. |
'MiniMap' | CS2, DOTA | sm | live | Enhanced map view with additional data. |
'GameClock' | CS2, DOTA | sm | live | In game clock. |
'Video' | CS2, DOTA | sm | live | Live stream (betting clients only). |
'ResultsPastMatches' | CS2, DOTA | m, c, sm, t | postmatch | Map results. |
'ResultsPlayerPerformance' | CS2, DOTA | m, c, sm, t | postmatch | Average player performances from current match. |
'ResultsTeamPerformance' | CS2, DOTA | m, c, sm, t | postmatch | Average team performances from current match. |
'FixtureInfo' | CS2, DOTA | sm | all | Basic info about the fixture. Available for all match stages. |
Player stats table special case
PlayerStatsTable element has composable stats. That means you can define and proioritize certain datapoints you want to see in your player stats table. There is a defined set of stats you can choose from. Essential player info is always part of the dataset though. From screensize of more than 420px you can select up to 8 datapoints. 4 below that. Datapoints marked as essential will always be visible (up to 4).
Data point | title | default | Description |
---|---|---|---|
main_weapon | CS2 | included | Showing the current main weapon of a player. If player does not have a main weapon, secondary weapon is displayed instead. |
health_percentage | CS2, DOTA | included | Current health of the player |
armor | CS2 | included | Has armor or not. |
current_money | CS2 | included | Showing the current money. |
equipment_value | CS2 | no | CS current equipment value of a player. |
kills | CS2, DOTA | essential | Kills of a player. |
assists | CS2, DOTA | essential | Assists of a player. |
deaths | CS2, DOTA | essential | Deaths of a player. |
adr | CS2, | essential | Average damage per round. |
headshots | CS2, | no | Headershots. |
level | DOTA | essential | Dota hero level. |
minion_kills | DOTA | included | Creep score. |
total_gold | DOTA | included | Total gold of a player. |
xp | DOTA | no | Experience. |
denies | DOTA | no | Denies of a player. |
JS interface for defining this in your widget settings looks as follows:
SDW.addWidget({
containerId: "YOUR_CONTAINER_ID",
type: "split-match",
locale: "en",
settings: {
elements: ["PlayerStatsTable"],
playerStatsDataPoints: [
{ name: 'main_weapon' },
{ name: 'health_percentage' },
{ name: 'armor' },
{ name: 'current_money' },
{ name: 'level', essential: true },
{ name: 'kills', essential: true },
{ name: 'deaths', essential: true },
{ name: 'assists', essential: true },
{ name: 'adr', essential: true },
{ name: 'minion_kills' },
{ name: 'total_gold' },
],
},
onTrack: (event, data) => {
console.log(event);
console.log(data);
},
});