Skip to contents

xG chart plotting

Usage

xg_chart(
  match_id,
  home_team_color,
  away_team_color,
  competition = "Premier League",
  background_color = "#FFF1E5"
)

Arguments

match_id

Match ID from understat.com

home_team_color

Color used for the home team

away_team_color

Color used for the away team

competition

Competition name as a subtitle; defaults to "Premier League"

background_color

Chart background color; defaults to "#FFF1E5"

Value

Interactive highcharter plot displaying the xG chart of both teams.

Examples

xg_chart(26631, "red", "grey", "#FFF1E5")