Nodyn:Graph:Population history/doc

Mae prif ffynhonnell y graff yma ar mediawiki Template:Graph:Population_history. Yn y fan honno mae golygu hwn!

Mae'r data'n dod o Wicidata, fel arfer, ond gall hefyd ddod o fannau eraill.

{{Graph:Population history|Q84}}
Hanes poblogaeth Cymru (data o Wicidata)


{{Graph:Population history

| table=Wikidata/St.Petersburg.tab
| atable=Original/St.Petersburg population annotations.tab}}
Dangos poblogaeth St Petersburg o dabl ar Comin, fel cymhariaeth: gydag anodiadau.


Inserts a graph with the population history for the given city.

Paramedrau'r nodyn

This template prefers block formatting of parameters.

ParamedrDisgrifiadMathStatws
City Wikidata ID1

Wikidata ID of the city or region

Yn ddiofyn
Q84
Llinyndewisol
Title of the data page on Commonstable

Data page name on Commons, without the Data: prefix. The table must contain "year" and "population" columns.

Llinyndewisol
Raw values for this graphvalues

Supply all values as a list of JSON objects: {"year":1980, "population":1000}, {"year":1984, "population":1045}, ...

Anhysbysdewisol
Title of the annotations data page on Commonsatable

Data page name on Commons, without the Data: prefix. The table must contain "year" column, and optional "text" and "color" columns.

Llinyndewisol
Raw annotation valuesavalues

Supply all annotation values as a list of JSON objects: {"year":1980, "text":"Big event"}, ...

Anhysbysdewisol
Filter expressionfilter

Optionally, filter the data with an expression, e.g. datum.year >= 1900 && datum.year < 2000

Anhysbysdewisol
Graph colorcolor

Shade with which to highlight the data in the chart

Yn ddiofyn
#00f
Enghraifft
#f00
Llinyndewisol
Interpolateinterpolate

How data points should be connected, e.g. linear, step-before, step-after, basis, basis-open, cardinal, cardinal-open, monotone

Yn ddiofyn
monotone
Enghraifft
linear
Llinyndewisol
Graph scalescale

Scaling could be one of these: linear, log, pow, sqrt, quantile, quantize, and threshold

Yn ddiofyn
linear
Enghraifft
log
Llinyndewisol
Maximum Y value axismax

This optional value might be useful to align multiple graphs side-by-side

Yn ddiofyn
Automatically scaled to the data.
Enghraifft
10000
Rhifdewisol
Widthwidth

Width for the chart in pixels, if different from the default.

Yn ddiofyn
400
Rhifdewisol
Heightheight

Height for the chart in pixels, if different from the default.

Yn ddiofyn
200
Rhifdewisol