Open main menu

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.

namelabeltyperequiredsuggesteddefaultdescription
stringlocalizedstringbooleanbooleanstringlocalized
namelabeltyperequiredsuggesteddefaultdescription
tabletypeTable type(5)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.(3)
tableTable(3)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(2)
typeX axis type(3)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)(3)
xFieldX field(3)stringId of the data column that contains values for the X axis. If type=year, xField is also "year" by default.(3)
seriesSeries(3)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".(2)
groupGroup(3)stringIf line color depends on just one column, specify that column's ID, instead of the series parameter.(3)
valueValue(3)stringIf line color depends on one column, this parameter should be set to the column which has the values(2)
xZeroX axis starts at 0(3)stringForce to start or not to start X axis with zero. Can be either true or false(3)
yZeroY axis zero starts at 0(2)stringForce to start or not to start Y axis with zero. Can be either true or false(2)
xMinX axis minimum(2)Force X axis to start from this value(2)
xMaxX axis maximum(2)Force X axis to end with this value(2)
yMinY axis minimum(3)Force Y axis to start from this value(3)
yMaxY axis maximum(3)Force Y axis to end with this value(2)
titleTitle(3)stringTitle of the whole graph(3)
xAxisX axis title(2)stringTitle of the X axis(2)
yAxisY axis title(2)stringTitle of the Y axis(2)
xGridX axis grid(2)booleanShow grid lines for X axis(2)
yGridY axis grid(2)booleanShow grid lines for Y axis(2)
xTicksX axis ticks(2)number7How many ticks to show on X axis. 7 by default. '-' value makes it automatic.(2)
yTicksY axis ticks(2)number-How many ticks to show on Y axis. Auto '-' by default.(2)
legendLegend(3)stringTitle of the legend(3)
widthWidth(3)number
heightheight(3)number
colorsColors(3)string"category10"The colors of the lines, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ](2)
debugstringDebug output: if set, will show graph as raw JSON(3)

Original work by User:Yurik

Data available under Creative Commons Zero.