Template:Vertical bar chart/doc: Difference between revisions

From Empire of Dragons
Jump to navigation Jump to search
m (syntaxhighlight lang="wikitext")
 
m (1 revision imported)
 
(No difference)

Latest revision as of 13:15, 26 June 2024

Usage

This template creates a vertical bar chart for a set of data of your choosing, for example, charting population demographics of a location. Up to twenty graphical bars can be used along with specified colors. The graph's width is set by default, but can be changed, as well as the large and small scales.

 
{{Vertical bar chart
|full_name =
|position =
|type = 
|name = 
|note = 
|large_scale = 
|small_scale = 
|height = 
|width = 
|color = 
|color_1 = 
|
|
}}

Parameters

All parameters are optional.

  • full_name: To be filled in.
  • type: Specify the type of data set you are charting.
  • position: Graph position (right, left, right-stack, left-stack, center, or none)
  • name: Name of the page.
  • note: Notes that appears at the bottom of the table. For example, a legend for the data.
  • large_scale: The default maximum value is calculated and is rounded up to a multiple of 100 and then divided by 10
  • small_scale: The default maximum value is calculated and is rounded up to a multiple of 100 and then divided by 50
  • height: Defaults to 300px.
  • width: Set by default.
  • color: The color assigned to all the bars that are not individually assigned another color.
  • color_1: Changed to assign the color of a bar independently from the default set by the color parameter
  • Name or reference value: For example, a given year (repeat for each bar you want to generate, up to 20).
  • Figure for the previous reference: For example, the number of inhabitants of the location for the year (repeat for each bar you want to generate, up to 20).

Examples

Example 1

{{Vertical bar chart|color_12=blue|type=demographic|1900|123|1910|225|1920|234|1930|345|1940|421|1950|542|1960|521|1970|622|1981|632|1991|645|2001|687|2009|676|note=<small>{{legend|#88c2cc|[[Population]] (1900-1991) Residential population (2001) according to the U.S. Census Bureau}}</small>
<small>{{legend|#0000FF|Population by local area census.}}</small>
}}
Vertical bar chart demographic of Vertical bar chart/doc between 1900 and 2009
<timeline>

Colors=

id:a value:gray(0.9)
id:b value:gray(0.7)
id:c value:rgb(1,1,1)
id:d value:rgb(0.6,0.7,1)

ImageSize = width:auto barincrement:35 height:300 PlotArea = left:50 bottom:30 top:30 right:30 DateFormat = x.y Period = from:0 till:700 TimeAxis = orientation:vertical AlignBars = justify ScaleMajor = gridcolor:b increment:100 start:0 ScaleMinor = gridcolor:a increment:20 start:0 BackgroundColors = canvas:c

BarData=

bar:1900  text:1900
bar:1910  text:1910
bar:1920  text:1920
bar:1930  text:1930
bar:1940  text:1940
bar:1950 text:1950
bar:1960 text:1960
bar:1970 text:1970
bar:1981 text:1981
bar:1991 text:1991
bar:2001 text:2001
bar:2009 text:2009








PlotData=

color:d width:20 align:left 
bar:1900  from:0 till:123
bar:1910  from:0 till:225
bar:1920  from:0 till:234
bar:1930  from:0 till:345
bar:1940  from:0 till:421
bar:1950 from:0 till:542
bar:1960 from:0 till:521
bar:1970 from:0 till:622
bar:1981 from:0 till:632
bar:1991 from:0 till:645
bar:2001 from:0 till:687
bar:2009 from:0 till:676 color:blue








PlotData=

bar:1900  at:123  fontsize:s text:123  shift:(-10,5)
bar:1910  at:225  fontsize:s text:225  shift:(-10,5)
bar:1920  at:234  fontsize:s text:234  shift:(-10,5)
bar:1930  at:345  fontsize:s text:345  shift:(-10,5)
bar:1940  at:421 fontsize:s text:421 shift:(-10,5)
bar:1950 at:542 fontsize:s text:542 shift:(-10,5)
bar:1960 at:521 fontsize:s text:521 shift:(-10,5)
bar:1970 at:622 fontsize:s text:622 shift:(-10,5)
bar:1981 at:632 fontsize:s text:632 shift:(-10,5)
bar:1991 at:645 fontsize:s text:645 shift:(-10,5)
bar:2001 at:687 fontsize:s text:687 shift:(-10,5)
bar:2009 at:676 fontsize:s text:676 shift:(-10,5)








</timeline>

  Population (1900-1991) Residential population (2001) according to the U.S. Census Bureau
  Population by local area census.

See also