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
  1. 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.
  2. Create the /data subpage of the template, for instance Template:Articles lacking sources chart/data and add only the content []
  3. 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.
  4. Have an admin configure the bot at User:MusikBot/CategoryCounter/config.
  5.  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

edit

No description.

Template parameters

ParameterDescriptionTypeStatus
Name of chartname

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

Example
articles-without-sources
Stringrequired
Title of chart templatetemplate

The title of the chart template with or without the Template: namespace prefix. For other namespaces, prefix with a colon

Example
Articles lacking sources chart
Stringrequired
Title for the y-axistitle

no description

Example
# articles lacking sources
Stringsuggested
Widthwidth

width of the chart in pixels

Numberoptional
Heightheight

Height of the chart in pixels

Numberoptional
Text colortext_color

The color of the text on the chart

Stringoptional
Grid widthgrid_width

The width of the grid lines

Numberoptional
Line colorline_color

The color of the line in the graph

Stringoptional
Line widthline_width

The width (in pixels) of the line in the graph

Numberoptional
Subpagesubpage

Use this to override the title of the subpage where the data lives.

Default
data
Stringoptional