Data:Templatedata/Graph:Lines.tab

From Miraheze Commons

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

namelabeltyperequiredsuggesteddefaultdescription
stringlocalizedstringbooleanbooleanstringlocalized
namelabeltyperequiredsuggesteddefaultdescription
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 FAMEData 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.(5)
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".(5)
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.(5)
filterFilter(2)stringOptionally filter data with an template expression parameter e.g. `filter = datum.some_dataset_field > 1900 && datum.some_dataset_field < 2000` where `some_dataset_field` means some valid field of displayed dataset(2)
xAxisZero, xZeroX axis starts at 0(5)stringForce to start or not to start X axis with zero. Can be either true or false.(6)
yAxisZero, yZeroY axis zero starts at 0(6)stringForce to start or not to start Y axis with zero. Can be either true or false.(5)
xAxisClampX axis scale clamp(2)booleanÉpingle sur l'échelle de l'axe X. Les courbes au delà de cette épingle seront cachées.(1)
yAxisClampY axis scale clamp(2)booleanÉpingle sur l'échelle de l'axe Y. Les courbes au delà de cette épingle seront cachées.(1)
xAxisMin, xMinX axis minimum(6)numberForce X axis to start from this value.(5)
xAxisMax, xMaxX axis maximum(5)numberForce X axis to end with this value.(5)
yAxisMin, yMinY axis minimum(5)numberForce Y axis to start from this value.(5)
yAxisMax, yMaxY axis maximum(5)numberForce Y axis to end with this value.(4)
yScaleY axis scale(4)stringlinearSet Y axis scaling type - linear, log and sqrt.(4)
replaceZerosWithReplace zero values(4)numberReplaces 0 values in Y data field. Recommended to be use alongside with yScale=log (else zeros will be filtered out).(4)
titleTitle(5)stringTitle of the whole graph.(5)
titleXAlignTitle horizontal alignment(2)stringHorizontal alignment of title, could be one of: left, center, right(2)
titleXOffsetTitle horizontal offset(2)numberHorizontal offset of title position, could be negative, to shift title to the left, or positive to shift title to the right(2)
xAxisTitleX axis title(5)stringTitle of the X axis.(5)
yAxisTitleY axis title(5)stringTitle of the Y axis.(5)
xAxisFormatX axis format(2)string%b %y (for dates)Changes the formatting of the X axis labels(2)
yAxisFormatY axis format(2)string,d (for numbers)Changes the formatting of the Y axis labels(2)
xAxisAngleX axis labels angle(2)numberRotates the x axis labels by the specified angle. Recommended values are: -45, +45, -90, +90.(2)
yAxisAngleY axis labels angle(2)numberRotates the y axis labels by the specified angle.(2)
xAxisFontSizeX axis labels font size(2)number
yAxisFontSizeY axis labels font size(2)number
xGridX axis grid(5)booleanShow grid lines for X axis.(5)
yGridY axis grid(5)booleanShow grid lines for Y axis.(5)
xTicks, xAxisTicksX axis ticks(5)number7How many ticks to show on X axis. 7 by default. '-' value makes it automatic.(5)
yTicks, yAxisTicksY axis ticks(5)number-How many ticks to show on Y axis. Auto '-' by default.(5)
vAnnotationsValuesRaw vertical annotation values(2)stringSupply all annotation values as a list of JSON objects: {"text": "Big event", "x": 1980}, ...(2)
hAnnotationsValuesRaw horizontal annotation values(2)stringSupply all horizontal annotation values as a list of JSON objects: {"text":"Big event", "y": 980}, ...(2)
vAnnotationsTableVertical annotation table(2)stringData page name on Commons, without the Data: prefix. The table must contain "x" column, and optional "text" and "color" columns.(2)
hAnnotationsTableHorizontal annotation table(2)stringData page name on Commons, without the Data: prefix. The table must contain "y" column, and optional "text" and "color" columns.(2)
vAnnotationsTransformsVertical annotation data transforms(2)string
hAnnotationsTransformsHorizontal annotation data transforms(2)string
legendLegend(5)stringTitle of the legend. "-" shows the legend without title.(5)
widthWidth(5)number
heightHeight(5)number
chartSizingChart sizing mode(2)stringfitChart sizing mode, could be one of: fit, pad. Use `fit` to force resulting chart canvas sizes to be exactly equal to provided width and height values. Use `pad` to define prefered plotting size with provided width and height values, and let Vega increase overall chart size to include legend and title (if any)(2)
colorsColors(5)stringThe colors of the lines, specified as a list like red, green. It has priority over colorscheme(5)
colorschemeColor scheme(5)stringcategory10The colors of the lines, specified as Vega defined rangeliteral.(5)
linewidthLine width(5)number2.5Line width for line charts or distance between the pie segments for pie charts.(5)
debugDebug(4)stringDebug output: if set, will show graph as raw JSON.(5)

Original work by c:User:Yurik

Data available under Creative Commons Zero.