Template:Graph:Horizontal bars/doc

From MediaWiki.org
Jump to navigation Jump to search

This graph's main version resides at Template:Graph:Stacked. Please make or suggest all the changes there, and copy it everywhere else (until the copying is automated)

{{Graph:Horizontal bars

| table=Wikimedia/CEE Spring/Statistics/MMXVI/Per country sums (general).tab
| xField=country
| series="articles", "created", "improved"
| title=Per country sums
| legend=Types
}}

See or edit source data.

This graph draws one or more independent numeric data series as lines. The data must be stored on Commons' Data namespace.

Template parameters

ParameterDescriptionTypeStatus
Tabletable

Data page name on Commons, without the Data: prefix. The table should contain xField column, like year or date, and one or more series columns to plot

Stringrequired
Typetype

Type of the x axis - time (e.g. "2015-10" or "2013-03-08"), year (integer, but treated as a year), linear (numbers), ordinal (anything)

Default
year
Stringsuggested
XFieldxField

Id of the data column that contains values for the X axis. If type=year, xField is also "year" by default.

Stringrequired
Seriesseries

List of the data columns to show as lines. Must be listed by field IDs: "field1", "field2", "field3".

Stringrequired
XZeroxZero

Force to start or not to start X axis with zero. Can be either true or false

Stringoptional
YZeroyZero

Force to start or not to start Y axis with zero. Can be either true or false

Stringoptional
XMinxMin

Force X axis to start from this value

Unknownoptional
XMaxxMax

Force X axis to end with this value

Unknownoptional
YMinyMin

Force Y axis to start from this value

Unknownoptional
YMaxyMax

Force Y axis to end with this value

Unknownoptional
Titletitle

Title of the whole graph

Stringoptional
XAxisxAxis

Title of the X axis

Stringoptional
YAxisyAxis

Title of the Y axis

Stringoptional
XGridxGrid

Show grid lines for X axis

Booleanoptional
YGridyGrid

Show grid lines for Y axis

Booleanoptional
Legendlegend

Title of the legend

Stringoptional
Widthwidth

no description

Numberoptional
Heightheight

no description

Numberoptional
Debugdebug

if set, will show graph as raw JSON

Stringoptional

Edit parameter translations