Jump to content

User:Chinissai/Tennis performance timeline/doc

From Wikipedia, the free encyclopedia

This template produces a performance timeline table for articles on tennis players and their career statistics.

As of April 27, 2017, the template is under development and only works with male tennis players.

Usage[edit]

The template's syntax is as follows:

{{User:Chinissai/Tennis performance timeline
|types=<tournament levels>
|country=<code>

<season statistics>
<season statistics>
...
<season statistics>

|last=<tournament>
|prizemoney=...
}}

Named parameters have the following descriptions:

  • |types=: the tournament levels to be displayed in the performance timeline table. The <tournament levels> is a comma-separated list, e.g., GS,Career. A tournament level is a string in the order entry in tennis.orders within Module:Tennis performance timeline/data, or the string Career to display career win–loss and tournament counts. If |types= is omitted, all applicable tournament levels and career statistics will be included in the performance timeline table.
  • |country=: the ISO 3166-1 alpha-3 country code for the player's nationality. This optional parameter is only used in the statistics for player's national representation, such as in the Olympics, Davis Cup, and Fed Cup.
  • |last=: the last tournament whose statistics is included in the performance timeline table. The <tournament> is a string entry in Module:Tennis performance timeline/calendar, e.g., GS Roland Garros. Not only does this optional parameter serve as a note to editors, but it will also trigger the performance table to display an absence of the player from a tournament that has already concluded in the current year. Therefore, performance timeline tables should be updated only at the conclusion of a tournament. If |last= is unspecified, no absence in the current year will be displayed in the table.
  • |prizemoney=: the prize money the player has won. The value of this optional parameter is displayed boldface, but otherwise as is, in the lower-right cell of the performance timeline table.

Statistics for older seasons should appear before statistics for more recent ones.

Season statistics[edit]

The statistics for each season has the following syntax:

|year|<year>
<tournament statistics>
<tournament statistics>
...
<tournament statistics>
<court statistics>
<court statistics>
...
<court statistics>
|rank|<rank>

The specification for each season's statistics begins with the (mandatory) year of the season, e.g., |year|2017, and ends with the optional year-end ranking, e.g., |rank|1.

Tournament and court statistics can be intertwined, but this style is not recommended.

Tournament statistics[edit]

The statistics for each tournament has the following syntax:

|<tournament name>|<outcome>|<wins>|<losses>
  • <tournament name> is a table key in tennis.tournaments within Module:Tennis performance timeline/data, e.g., GS Wimbledon and 1000 Indian Wells. To add a new or missing tournament, please submit a request on the template's talk page.
  • <outcome> is the player's outcome of the tournament. This is a table key in tennis.rounds within Module:Tennis performance timeline/data, e.g., W and 4R, except for Davis Cup zones, where the zone number follows Z, as in Z1.
  • <wins> and <losses> are the official match wins and losses for the tournament. For instance, qualifying matches and walkovers are not counted and should not be included in the wins and losses.

Each tournament's statistics populates a cell within the performance timeline table. This cell might include a wikilink to the appropriate article for that tournament in the respective year. A red link indicates that the specifications of the tournament are incomplete; please report red links on the template's talk page.

Court statistics[edit]

The statistics for each court type has the following syntax:

|<environment>|<surface>|<tournament count>|<wins>|<losses>|<titles>|<runnerups>
  • <environment> is either outdoor or indoor
  • <surface> is a court surface, a table key in tennis.surfaces within Module:Tennis performance timeline/data. Currently, this is one of hard, clay, grass, and carpet.
  • <tournament count> is the number of tournaments played in this court type.
  • <wins> and <wins> are the official match wins and losses for this court type.
  • <titles> is the number of titles won in this court type.
  • <runnerups> is the number of final matches reached in this court type without winning a title.

Court types without an official match should be omitted.

Examples[edit]

Examples reflect Roger Federer's statistics from 2012 to 2013

Full display[edit]

This is the template's default behavior.

{{User:Chinissai/Tennis performance timeline
|country=SUI

|year|2012
|GS Australian Open|SF|4|1
|Davis Cup|1R|2|1
|1000 Indian Wells|W|6|0
|1000 Miami|3R|1|1
|1000 Madrid|W|5|0
|1000 Rome|SF|3|1
|GS Roland Garros|SF|5|1
|GS Wimbledon|W|7|0
|Summer Olympics|F-S|5|1
|1000 Cincinnati|W|5|0
|GS US Open|QF|3|1
|1000 Shanghai|SF|3|1
|World Tour Finals|F|3|2
|outdoor|hard|8|30|4|3|0
|outdoor|clay|3|15|2|1|0
|outdoor|grass|3|15|2|1|2
|indoor|hard|3|11|3|1|2
|indoor|clay|0|0|1|0|0
|rank|2

|year|2013
|GS Australian Open|SF|5|1
|1000 Indian Wells|QF|3|1
|1000 Madrid|3R|1|1
|1000 Rome|F|4|1
|GS Roland Garros|QF|4|1
|GS Wimbledon|2R|1|1
|1000 Cincinnati|QF|2|1
|GS US Open|4R|3|1
|1000 Shanghai|3R|1|1
|1000 Paris|SF|3|1
|World Tour Finals|SF|2|2
|outdoor|hard|6|17|6|0|0
|outdoor|clay|5|12|5|0|1
|outdoor|grass|2|5|1|1|0
|indoor|hard|4|11|5|0|1
|rank|6
}}
Tournament20122013SRW–LWin %
TournamentAustralian OpenSFSF0 / 29–281.82%
French OpenSFQF0 / 29–281.82%
WimbledonW2R1 / 28–188.89%
US OpenQF4R0 / 26–275.00%
Win–Loss19–313–41 / 832–782.05%
Year-end championshipsATP World Tour FinalsFSF0 / 25–455.56%
Win–Loss3–22–20 / 25–455.56%
Masters 1000Indian Wells MastersWQF1 / 29–190.00%
Miami Open3RA0 / 11–150.00%
Madrid OpenW3R1 / 26–185.71%
Italian OpenSFF0 / 27–277.78%
Cincinnati MastersWQF1 / 27–187.50%
Shanghai MastersSF3R0 / 24–266.67%
Paris MastersASF0 / 13–175.00%
Win–Loss23–314–63 / 1237–980.43%
National representationSummer OlympicsF-SNH0 / 15–183.33%
Davis Cup1RA0 / 12–166.67%
Win–Loss7–20 / 27–277.78%
CareerHard Win–Loss41–728–114 / 2169–1879.31%
Clay Win–Loss15–312–51 / 827–877.14%
Grass Win–Loss15–25–12 / 520–386.96%
Outdoor Win–Loss60–834–126 / 2794–2082.46%
Indoor Win–Loss11–411–51 / 722–970.97%
Overall Win–Loss71–1245–177 / 34116–2980.00%
Win %85.5%72.6%
Tournaments played171734 total20.6%
Finals reached10313 total53.8%
Titles617 total
Year-end ranking26

With specified types[edit]

A single type in |types= generates a short-form table.

{{User:Chinissai/Tennis performance timeline
|types=GS
|country=SUI

|year|2012
|GS Australian Open|SF|4|1
|Davis Cup|1R|2|1
|1000 Indian Wells|W|6|0
|1000 Miami|3R|1|1
|1000 Madrid|W|5|0
|1000 Rome|SF|3|1
|GS Roland Garros|SF|5|1
|GS Wimbledon|W|7|0
|Summer Olympics|F-S|5|1
|1000 Cincinnati|W|5|0
|GS US Open|QF|3|1
|1000 Shanghai|SF|3|1
|World Tour Finals|F|3|2
|outdoor|hard|8|30|4|3|0
|outdoor|clay|3|15|2|1|0
|outdoor|grass|3|15|2|1|2
|indoor|hard|3|11|3|1|2
|indoor|clay|0|0|1|0|0
|rank|2

|year|2013
|GS Australian Open|SF|5|1
|1000 Indian Wells|QF|3|1
|1000 Madrid|3R|1|1
|1000 Rome|F|4|1
|GS Roland Garros|QF|4|1
|GS Wimbledon|2R|1|1
|1000 Cincinnati|QF|2|1
|GS US Open|4R|3|1
|1000 Shanghai|3R|1|1
|1000 Paris|SF|3|1
|World Tour Finals|SF|2|2
|outdoor|hard|6|17|6|0|0
|outdoor|clay|5|12|5|0|1
|outdoor|grass|2|5|1|1|0
|indoor|hard|4|11|5|0|1
|rank|6
}}
Tournament20122013SRW–LWin %
Australian OpenSFSF0 / 29–281.82%
French OpenSFQF0 / 29–281.82%
WimbledonW2R1 / 28–188.89%
US OpenQF4R0 / 26–275.00%
Win–Loss19–313–41 / 832–782.05%

The |types= parameter can be a list of comma-separated values. The career summary is unaffected by specified types.

{{User:Chinissai/Tennis performance timeline
|types=ATP1000,Career
|country=SUI

|year|2012
|GS Australian Open|SF|4|1
|Davis Cup|1R|2|1
|1000 Indian Wells|W|6|0
|1000 Miami|3R|1|1
|1000 Madrid|W|5|0
|1000 Rome|SF|3|1
|GS Roland Garros|SF|5|1
|GS Wimbledon|W|7|0
|Summer Olympics|F-S|5|1
|1000 Cincinnati|W|5|0
|GS US Open|QF|3|1
|1000 Shanghai|SF|3|1
|World Tour Finals|F|3|2
|outdoor|hard|8|30|4|3|0
|outdoor|clay|3|15|2|1|0
|outdoor|grass|3|15|2|1|2
|indoor|hard|3|11|3|1|2
|indoor|clay|0|0|1|0|0
|rank|2

|year|2013
|GS Australian Open|SF|5|1
|1000 Indian Wells|QF|3|1
|1000 Madrid|3R|1|1
|1000 Rome|F|4|1
|GS Roland Garros|QF|4|1
|GS Wimbledon|2R|1|1
|1000 Cincinnati|QF|2|1
|GS US Open|4R|3|1
|1000 Shanghai|3R|1|1
|1000 Paris|SF|3|1
|World Tour Finals|SF|2|2
|outdoor|hard|6|17|6|0|0
|outdoor|clay|5|12|5|0|1
|outdoor|grass|2|5|1|1|0
|indoor|hard|4|11|5|0|1
|rank|6
}}
Tournament20122013SRW–LWin %
Masters 1000Indian Wells MastersWQF1 / 29–190.00%
Miami Open3RA0 / 11–150.00%
Madrid OpenW3R1 / 26–185.71%
Italian OpenSFF0 / 27–277.78%
Cincinnati MastersWQF1 / 27–187.50%
Shanghai MastersSF3R0 / 24–266.67%
Paris MastersASF0 / 13–175.00%
Win–Loss23–314–63 / 1237–980.43%
CareerHard Win–Loss41–728–114 / 2169–1879.31%
Clay Win–Loss15–312–51 / 827–877.14%
Grass Win–Loss15–25–12 / 520–386.96%
Outdoor Win–Loss60–834–126 / 2794–2082.46%
Indoor Win–Loss11–411–51 / 722–970.97%
Overall Win–Loss71–1245–177 / 34116–2980.00%
Win %85.5%72.6%
Tournaments played171734 total20.6%
Finals reached10313 total53.8%
Titles617 total
Year-end ranking26

More examples can be found in subpages of this template.