Graphs are unavailable due to technical issues. There is more info on Phabricator and on MediaWiki.org. |
This template makes it easier to show charts that use data provided by the CategoryCounter bot. The above example is the equivalent of {{articles lacking sources chart}}, which shows the size of Category:All articles lacking sources over time.
Instructions
edit- Create the template for the chart, such as {{articles lacking sources chart}}. You only need to call {{category chart}} at minimum with the following parameters:
name
– a unique identifier for the chart, such as"articles-without-sources"
template
– the name of the template that you created, with or without the Template: prefix. Prefix with a colon (:
) for other namespaces. For instance"Articles lacking sources chart"
refers to Template:Articles lacking sources chart and":Wikipedia:WikiProject Articles for creation/Backlog chart"
refers to Wikipedia:WikiProject Articles for creation/Backlog chart.title
– (optional) title for the y-axis, such as"# articles lacking sources"
- See the template data below for other options.
- Create the /data subpage of the template, for instance Template:Articles lacking sources chart/data and add only the content
[]
- Have an admin or template editor change the content type of the /data page to JSON, for instance at Special:ChangeContentModel/Template:Articles lacking sources chart/data.
- Have an admin configure the bot at User:MusikBot/CategoryCounter/config.
- Done The bot should start updating the data within the specified granularity (so within a week if you chose "weekly"), which in turn will be visualized in the chart. You can also manually add historical data to the dataset, if you wish.
Template data
editNo description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Name of chart | name | Unique identifier for the chart. This can be anything, usually the name of the category with dashes instead of spaces, such as articles-without-sources
| String | required |
Title of chart template | template | The title of the chart template with or without the Template: namespace prefix. For other namespaces, prefix with a colon
| String | required |
Title for the y-axis | title | no description
| String | suggested |
Width | width | width of the chart in pixels | Number | optional |
Height | height | Height of the chart in pixels | Number | optional |
Text color | text_color | The color of the text on the chart | String | optional |
Grid width | grid_width | The width of the grid lines | Number | optional |
Line color | line_color | The color of the line in the graph | String | optional |
Line width | line_width | The width (in pixels) of the line in the graph | Number | optional |
Subpage | subpage | Use this to override the title of the subpage where the data lives.
| String | optional |