Jump to content

Template:Graph:Lines/testcases

From Wikipedia, the free encyclopedia
Gender Pay Gap
{{Graph:Lines|interpolate=linear |legend=Age group |series="age_16_24", "age_25_34", "age_35_44", "age_45_54" |symbols=1 |table=bls.gov/US Women's weekly earnings as a percent of men's by age, annual averages.tab |title=Gender pay gap in the United States |type=year |vAnnotationsValues={"text": "Fictitious event", "x": 1990} |width=500 |xAxis=Year |xField=year |yAxis=Percentage |yGrid=y |yMax=100 |yZero=false}}

{{Graph:Lines}}

Gender pay gap in the United States. See or edit source data.

{{Graph:Lines/sandbox}}

Gender pay gap in the United States. See or edit source data.
Paintings
{{Graph:Lines|hAnnotationsValues={"text": "Fictitious value", "y": 20000} |series="count" |table=SELECT ?decade (COUNT(?decade) AS ?count) WHERE {
  ?item wdt:P31 wd:Q3305213 .
  ?item wdt:P571 ?inception .
  BIND( year(?inception) as ?year ). 
  BIND( ROUND(?year/10)*10 as ?decade ) .
  FILTER( ?year > 1400)
  FILTER( ?year <= year(now()))
} GROUP BY ?decade ORDER BY ?decade |tabletype=query |title=Paintings by decade |type=year |width=550 |xField=decade |yAxisFormat=s |yZero=false}}

{{Graph:Lines}}

Paintings by decade. See Wikidata query.

{{Graph:Lines/sandbox}}

Paintings by decade. See Wikidata query.
Population
{{Graph:Lines|colorscheme=category20 |group=countryLabel |legend=- |table=#Population of countries sharing a border with Germany
SELECT ?year ?population ?countryLabel WHERE {
  {
    SELECT ?country ?year (AVG(?populations) AS ?population) WHERE {
      {
        SELECT ?country (YEAR(?date) AS ?year) ?populations WHERE {
          ?country wdt:P47 wd:Q183.
          ?country p:P1082 ?populationStatement.
          ?populationStatement ps:P1082 ?populations.
          ?populationStatement pq:P585 ?date.
        }  
      }
         FILTER( ?year >= 1900)
    }
    GROUP BY ?country ?year
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} |tabletype=query |type=year |value=population |width=600 |xField=year |xGrid=y |yAxisFormat=.1s |yGrid=y |yTicks=7}}

{{Graph:Lines}}

{{Graph:Lines/sandbox}}