From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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

tabletypeTable type(9)stringtabSpecifies the type of the table data. "tab" (default) uses data namespace on commons, without the data: prefix. "query" sends request to wikidata query service.(6)
tableTable(7)stringData 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. If tabletype parameter is set to "query", this value is the query.(4)
typeX axis type(6)stringyearType of the x axis - time (e.g. "2015-10" or "2013-03-08"), year (integer, but treated as a year), linear (numbers), ordinal (anything).(6)
xFieldX field(6)stringId of the data column that contains values for the X axis. If type=year, xField is also "year" by default.(6)
seriesSeries(6)stringIf each line is represented by a separate column of data (or if there is only one column), list of the data columns to show as lines. Must be in quotes, and listed by field IDs if coming from a .tab page: "field1", "field2", "field3".(4)
groupGroup(6)stringIf line color depends on just one column, specify that column's ID, instead of the series parameter.(6)
valueValue(6)stringIf line color depends on one column, this parameter should be set to the column which has the values.(4)
xZeroX axis starts at 0(5)stringForce to start or not to start X axis with zero. Can be either true or false.(6)
yZeroY axis zero starts at 0(5)stringForce to start or not to start Y axis with zero. Can be either true or false.(5)
xMinX axis minimum(5)Force X axis to start from this value.(4)
xMaxX axis maximum(4)Force X axis to end with this value.(4)
yMinY axis minimum(5)Force Y axis to start from this value.(5)
yMaxY axis maximum(5)Force Y axis to end with this value.(4)
yScaleY axis scale(3)stringlinearSet Y axis scaling type - linear, log and sqrt.(3)
replaceZerosWithReplace zero values(3)numberReplaces 0 values in Y data field. Recommended to be use alongside with yScale=log (else zeros will be filtered out).(3)
titleTitle(5)stringTitle of the whole graph.(5)
xAxisX axis title(4)stringTitle of the X axis.(4)
yAxisY axis title(4)stringTitle of the Y axis.(4)
xGridX axis grid(4)booleanShow grid lines for X axis.(4)
yGridY axis grid(4)booleanShow grid lines for Y axis.(4)
xTicksX axis ticks(4)number7How many ticks to show on X axis. 7 by default. '-' value makes it automatic.(4)
yTicksY axis ticks(4)number-How many ticks to show on Y axis. Auto '-' by default.(4)
legendLegend(5)stringTitle of the legend.(5)
colorsColors(5)string"category10"The colors of the lines, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ].(4)
debugDebug(4)stringDebug output: if set, will show graph as raw JSON.(5)

Original work by User:Yurik

Data available under Creative Commons Zero.