powered by
Plot an xG chart of a football match
xg_chart( match_id, home_team_color, away_team_color, competition = "", bg_color = "#FFF1E5", plot_bg_color = "#FFF1E5" )
Interactive highcharter plot displaying the xG chart of both teams.
Match ID from understat.com
Color used for the home team
Color used for the away team
Competition name as a subtitle; empty by default.
Chart background color; defaults to "#FFF1E5"
Plot background color; defaults to "#FFF1E5"
if (FALSE) { xg_chart(26631, "red", "grey", competition = "Premier League") }
Run the code above in your browser using DataLab