Charts: Team Default Stats

Pro Feature

Display a bar chart showing match statistics (corners, fouls, shots, etc.) across recent games. Perfect for tracking team performance trends and match analysis pages.

Premium Feature

This shortcode requires the Football Leagues Premium plugin.

Basic Usage

[anwpfl-charts type="team-defaults" club_id="8" stat="corners"]

This displays a bar chart of the selected statistic across recent matches, with opponent names on the x-axis.

Shortcode Builder

Use the visual shortcode builder to configure parameters without memorizing syntax:

Available Statistics

Stat ValueDescription
foulsFouls committed per match
cornersCorner kicks won
offsidesOffside calls against the team
possessionBall possession percentage
shotsTotal shots attempted
shots_on_goalShots on target

Parameters

ParameterDefaultDescription
type *(required)Must be team-defaults
club_id *(required)Club ID to analyze
statfoulsStatistic to display (see table above)
competition_id(all)Filter to specific competition (main stage only via selector)
season_id(all)Filter to specific season
league_id(all)Filter to specific league
club_side(all)Filter: home or away matches only
multistage0Set to 1 to include all competition stages (knockouts, playoffs)
limit0Maximum matches to show (0 = all)
x_axis_label1Show opponent names on x-axis. Use 0 to hide
data_label1Show values inside bars. Use 0 to hide
title(empty)Custom chart title displayed above the chart
color(default)Bar color: hex code (e.g., #800000) or club for team color
no_data_text(empty)Text displayed when no data available

* = Required parameter

Competition Filtering

The shortcode builder selector only allows selecting main stages of competitions. By default (multistage="0"), only the main stage statistics are shown.

Include All Stages

To include statistics from all stages (knockouts, playoffs), add multistage="1" to your shortcode.

Examples

Corners per Match (Last 10)

When to use: Track corner kick trends in recent matches.

[anwpfl-charts type="team-defaults" club_id="8" stat="corners" limit="10" color="club" title="Corners - Last 10 Matches"]

Result: Bar chart of corners in last 10 matches using team’s primary color.

Shooting Accuracy Trend

When to use: Analyze shots on target performance over a season.

[anwpfl-charts type="team-defaults" club_id="8" stat="shots_on_goal" season_id="5" title="Shots on Target"]

Result: All matches in the season showing shots on target per game.

Home Possession Analysis

When to use: Compare possession in home matches only.

[anwpfl-charts type="team-defaults" club_id="8" stat="possession" club_side="home" color="#1e40af"]

Result: Possession percentages for home matches with custom blue color.

Team Analysis Dashboard

When to use: Team profile statistics section with multiple charts.

[anwpfl-charts type="team-defaults" club_id="8" stat="shots_on_goal" limit="10" color="club"]
[anwpfl-charts type="team-defaults" club_id="8" stat="corners" limit="10" color="club"]
[anwpfl-charts type="team-defaults" club_id="8" stat="possession" limit="10" color="club"]

Result: Three charts showing shooting, corners, and possession trends.

Tip

Use color="club" to automatically use the team’s primary color from their profile, creating a cohesive visual experience.

Troubleshooting

Chart not displaying?

  • Verify the club_id is correct and the club exists
  • Check that match statistics are entered (these stats come from match default stats, not goals)
  • Ensure JavaScript is enabled in the browser

No data for specific stat?

  • Not all matches may have all statistics recorded
  • Try a different stat to confirm data exists
  • Check match edit pages to verify stats are entered

Related