<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Help%3ABarchart</id>
	<title>Help:Barchart - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Help%3ABarchart"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Help:Barchart&amp;action=history"/>
	<updated>2026-05-07T08:50:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Help:Barchart&amp;diff=22583&amp;oldid=prev</id>
		<title>Richardpruen: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Help:Barchart&amp;diff=22583&amp;oldid=prev"/>
		<updated>2022-01-02T17:14:48Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:14, 2 January 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-22582:rev-22583 --&gt;
&lt;/table&gt;</summary>
		<author><name>Richardpruen</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Help:Barchart&amp;diff=22582&amp;oldid=prev</id>
		<title>Wikipedia&gt;Pythoncoder: sc</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Help:Barchart&amp;diff=22582&amp;oldid=prev"/>
		<updated>2018-05-30T20:39:44Z</updated>

		<summary type="html">&lt;p&gt;sc&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Wikipedia how-to|H:BCHART|H:BC}}&lt;br /&gt;
{{TOC Right}}&lt;br /&gt;
This page describes techniques for generating a [[bar chart]] in a Wikipedia page, by coding a set of numbers in a {{tag|timeline}} tag format. It can display charts in various formats. The whole image is scaled by a command, e.g. &amp;quot;ImageSize=width:180 height:90&amp;quot;, and using the keyword &amp;quot;bar&amp;quot; triggers the bar chart features. However, the {{tl|Bar chart}} can easily format a horizontal bar chart (scrolling down a page), with one or two or four columns of bars in a chart.&lt;br /&gt;
&lt;br /&gt;
Here, with the {{tag|timeline}}, the a vertical bars is formatted by the command &amp;quot;TimeAxis=orientation:vertical&amp;quot; (before specifying the data for the bars). The width of bars is set by &amp;quot;PlotData=width:20&amp;quot;. The color of any bar can be set by appending the keyword &amp;quot;color:&amp;quot; (such as &amp;quot;color:lightgrey&amp;quot;) at the end of each bar&amp;#039;s numeric data.&lt;br /&gt;
&lt;br /&gt;
For other optional parameters, see {{section link||Bar chart commands and attributes|np=y}}, or full list at [[Help:Timeline]].&lt;br /&gt;
&lt;br /&gt;
== Example of a population bar chart ==&lt;br /&gt;
The following bar chart is generated, live, using a timeline-tag structure which contains population numbers for each year in the bar chart (markup shown further below).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;timeline&amp;gt;&lt;br /&gt;
Colors=&lt;br /&gt;
  id:lightgrey value:gray(0.9)&lt;br /&gt;
  id:darkgrey  value:gray(0.8)&lt;br /&gt;
  id:sfondo value:rgb(1,1,1)&lt;br /&gt;
  id:barra value:rgb(0.6,0.7,0.8)&lt;br /&gt;
&lt;br /&gt;
ImageSize  = width:450 height:305&lt;br /&gt;
PlotArea   = left:50 bottom:50 top:30 right:30&lt;br /&gt;
DateFormat = x.y&lt;br /&gt;
Period     = from:0 till:2000&lt;br /&gt;
TimeAxis   = orientation:vertical&lt;br /&gt;
AlignBars  = justify&lt;br /&gt;
ScaleMajor = gridcolor:darkgrey increment:1000 start:0&lt;br /&gt;
ScaleMinor = gridcolor:lightgrey increment:200 start:0&lt;br /&gt;
BackgroundColors = canvas:sfondo&lt;br /&gt;
&lt;br /&gt;
BarData=&lt;br /&gt;
  bar:1861 text:1861&lt;br /&gt;
  bar:1871 text:1871&lt;br /&gt;
  bar:1881 text:1881&lt;br /&gt;
  bar:1901 text:1901&lt;br /&gt;
  bar:1911 text:1911&lt;br /&gt;
  bar:1921 text:1921&lt;br /&gt;
  bar:1931 text:1931&lt;br /&gt;
  bar:1936 text:1936&lt;br /&gt;
  bar:1951 text:1951&lt;br /&gt;
  bar:1961 text:1961&lt;br /&gt;
  bar:1971 text:1971&lt;br /&gt;
  bar:1981 text:1981&lt;br /&gt;
  bar:1991 text:1991&lt;br /&gt;
  bar:2001 text:2001&lt;br /&gt;
&lt;br /&gt;
PlotData=&lt;br /&gt;
  color:barra width:20 align:left&lt;br /&gt;
&lt;br /&gt;
  bar:1861 from: 0 till:390&lt;br /&gt;
  bar:1871 from: 0 till:401&lt;br /&gt;
  bar:1881 from: 0 till:410&lt;br /&gt;
  bar:1901 from: 0 till:510&lt;br /&gt;
  bar:1911 from: 0 till:604&lt;br /&gt;
  bar:1921 from: 0 till:731&lt;br /&gt;
  bar:1931 from: 0 till:804&lt;br /&gt;
  bar:1936 from: 0 till:833&lt;br /&gt;
  bar:1951 from: 0 till:972&lt;br /&gt;
  bar:1961 from: 0 till:1125&lt;br /&gt;
  bar:1971 from: 0 till:1266 color:blue&lt;br /&gt;
  bar:1981 from: 0 till:1227&lt;br /&gt;
  bar:1991 from: 0 till:1266&lt;br /&gt;
  bar:2001 from: 0 till:1385&lt;br /&gt;
&lt;br /&gt;
PlotData=&lt;br /&gt;
&lt;br /&gt;
  bar:1861 at:390 fontsize:XS text: 390 shift:(-8,5)&lt;br /&gt;
  bar:1871 at:401 fontsize:XS text: 401 shift:(-8,5)&lt;br /&gt;
  bar:1881 at:410 fontsize:XS text: 410 shift:(-8,5)&lt;br /&gt;
  bar:1901 at:510 fontsize:XS text: 510 shift:(-8,5)&lt;br /&gt;
  bar:1911 at:604 fontsize:XS text: 604 shift:(-8,5)&lt;br /&gt;
  bar:1921 at:731 fontsize:XS text: 731 shift:(-8,5)&lt;br /&gt;
  bar:1931 at:804 fontsize:XS text: 804 shift:(-8,5)&lt;br /&gt;
  bar:1936 at:833 fontsize:XS text: 833 shift:(-8,5)&lt;br /&gt;
  bar:1951 at:972 fontsize:XS text: 972 shift:(-8,5)&lt;br /&gt;
  bar:1961 at:1125 fontsize:XS text: 1125 shift:(-8,5)&lt;br /&gt;
  bar:1971 at:1266 fontsize:XS text: 1266 shift:(-8,5)&lt;br /&gt;
  bar:1981 at:1227 fontsize:XS text: 1227 shift:(-8,5)&lt;br /&gt;
  bar:1991 at:1266 fontsize:XS text: 1266 shift:(-8,5)&lt;br /&gt;
  bar:2001 at:1385 fontsize:XS text: 1385 shift:(-8,5)&lt;br /&gt;
&lt;br /&gt;
TextData=&lt;br /&gt;
  fontsize:M pos:(20,10)  text:Data from ISTAT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/timeline&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above [[bar chart]], showing population bars for each year, can be generated by using the markup text listed below. The example text (&amp;#039;&amp;#039;below&amp;#039;&amp;#039;) can be copied and shortened, or expanded, to handle other years or numbers in a bar chart format. The image size is set as &amp;quot;ImageSize&amp;amp;nbsp;= width:450 height:305&amp;quot; for a box of 450x305px. Bar charts can be made simpler by omitting some of the various data options, such as dropping the keyword &amp;quot;at:&amp;quot; (&amp;quot;at:390&amp;quot;) which places labels &amp;#039;&amp;#039;at&amp;#039;&amp;#039; certain locations on a bar.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;timeline&amp;gt;&lt;br /&gt;
Colors=&lt;br /&gt;
  id:lightgrey value:gray(0.9)&lt;br /&gt;
  id:darkgrey  value:gray(0.8)&lt;br /&gt;
  id:sfondo value:rgb(1,1,1)&lt;br /&gt;
  id:barra value:rgb(0.6,0.7,0.8)&lt;br /&gt;
&lt;br /&gt;
ImageSize  = width:450 height:305&lt;br /&gt;
PlotArea   = left:50 bottom:50 top:30 right:30&lt;br /&gt;
DateFormat = x.y&lt;br /&gt;
Period     = from:0 till:2000&lt;br /&gt;
TimeAxis   = orientation:vertical&lt;br /&gt;
AlignBars  = justify&lt;br /&gt;
ScaleMajor = gridcolor:darkgrey increment:1000 start:0&lt;br /&gt;
ScaleMinor = gridcolor:lightgrey increment:200 start:0&lt;br /&gt;
BackgroundColors = canvas:sfondo&lt;br /&gt;
&lt;br /&gt;
BarData=&lt;br /&gt;
  bar:1861 text:1861&lt;br /&gt;
  bar:1871 text:1871&lt;br /&gt;
  bar:1881 text:1881&lt;br /&gt;
  bar:1901 text:1901&lt;br /&gt;
  bar:1911 text:1911&lt;br /&gt;
  bar:1921 text:1921&lt;br /&gt;
  bar:1931 text:1931&lt;br /&gt;
  bar:1936 text:1936&lt;br /&gt;
  bar:1951 text:1951&lt;br /&gt;
  bar:1961 text:1961&lt;br /&gt;
  bar:1971 text:1971&lt;br /&gt;
  bar:1981 text:1981&lt;br /&gt;
  bar:1991 text:1991&lt;br /&gt;
  bar:2001 text:2001&lt;br /&gt;
&lt;br /&gt;
PlotData=&lt;br /&gt;
  color:barra width:20 align:left&lt;br /&gt;
&lt;br /&gt;
  bar:1861 from: 0 till:390&lt;br /&gt;
  bar:1871 from: 0 till:401&lt;br /&gt;
  bar:1881 from: 0 till:410&lt;br /&gt;
  bar:1901 from: 0 till:510&lt;br /&gt;
  bar:1911 from: 0 till:604&lt;br /&gt;
  bar:1921 from: 0 till:731&lt;br /&gt;
  bar:1931 from: 0 till:804&lt;br /&gt;
  bar:1936 from: 0 till:833&lt;br /&gt;
  bar:1951 from: 0 till:972&lt;br /&gt;
  bar:1961 from: 0 till:1125&lt;br /&gt;
  bar:1971 from: 0 till:1266  color:blue&lt;br /&gt;
  bar:1981 from: 0 till:1227&lt;br /&gt;
  bar:1991 from: 0 till:1266&lt;br /&gt;
  bar:2001 from: 0 till:1385&lt;br /&gt;
&lt;br /&gt;
PlotData=&lt;br /&gt;
&lt;br /&gt;
  bar:1861 at:390 fontsize:XS text: 390 shift:(-8,5)&lt;br /&gt;
  bar:1871 at:401 fontsize:XS text: 401 shift:(-8,5)&lt;br /&gt;
  bar:1881 at:410 fontsize:XS text: 410 shift:(-8,5)&lt;br /&gt;
  bar:1901 at:510 fontsize:XS text: 510 shift:(-8,5)&lt;br /&gt;
  bar:1911 at:604 fontsize:XS text: 604 shift:(-8,5)&lt;br /&gt;
  bar:1921 at:731 fontsize:XS text: 731 shift:(-8,5)&lt;br /&gt;
  bar:1931 at:804 fontsize:XS text: 804 shift:(-8,5)&lt;br /&gt;
  bar:1936 at:833 fontsize:XS text: 833 shift:(-8,5)&lt;br /&gt;
  bar:1951 at:972 fontsize:XS text: 972 shift:(-8,5)&lt;br /&gt;
  bar:1961 at:1125 fontsize:XS text: 1125 shift:(-8,5)&lt;br /&gt;
  bar:1971 at:1266 fontsize:XS text: 1266 shift:(-8,5)&lt;br /&gt;
  bar:1981 at:1227 fontsize:XS text: 1227 shift:(-8,5)&lt;br /&gt;
  bar:1991 at:1266 fontsize:XS text: 1266 shift:(-8,5)&lt;br /&gt;
  bar:2001 at:1385 fontsize:XS text: 1385 shift:(-8,5)&lt;br /&gt;
&lt;br /&gt;
TextData=&lt;br /&gt;
  fontsize:S pos:(20,10) text:Data from ISTAT&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/timeline&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above text will generate the bar chart-image shown above, with 14 bars in an image box, sized 450x305 pixels, with the left-corner note &amp;quot;Data from ISTAT&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Bar chart commands and attributes ==&lt;br /&gt;
Each bar chart command is followed by an equal-sign (&amp;quot;=&amp;quot;), while attributes are followed by a colon (&amp;quot;:&amp;quot;) as in the command &amp;quot;Period&amp;amp;nbsp;= from:0 till:2000&amp;quot; which sets the vertical (y-axis) range from 0-2000.&lt;br /&gt;
&lt;br /&gt;
The timeline commands to format the graph layout are:&lt;br /&gt;
: ImageSize  = width:450 height:305&lt;br /&gt;
::: The numbers 450 and 305 are pixel sizes of the image box.&lt;br /&gt;
: PlotArea = left:50 bottom:50 top:30 right:30&lt;br /&gt;
::: The PlotArea defines margins around the bar chart inside the image.&lt;br /&gt;
: DateFormat = x.y&lt;br /&gt;
::: This sets the date format, if needed.&lt;br /&gt;
: Period = from:0 till:2000&lt;br /&gt;
::: The Period is the range of numbers along the vertical axis (y-axis numbers). Setting attribute &amp;quot;till&amp;quot; larger by 500 (as &amp;quot;till:2500&amp;quot;) would compress the bars, as 20% shorter within the image box.&lt;br /&gt;
: TimeAxis  = orientation:vertical&lt;br /&gt;
::: The attribute value as &amp;quot;vertical&amp;quot; displays the bars as upright.&lt;br /&gt;
: AlignBars = justify&lt;br /&gt;
::: Using command &amp;quot;AlignBars=justify&amp;quot; will auto-widen the bars to fit.&lt;br /&gt;
: ScaleMajor = gridcolor:darkgrey increment:1000 start:0&lt;br /&gt;
::: Command &amp;quot;ScaleMajor&amp;quot; sets the major y-axis ruler lines across the graph.&lt;br /&gt;
: ScaleMinor = gridcolor:lightgrey increment:200 start:0&lt;br /&gt;
::: Command &amp;quot;ScaleMinor&amp;quot; sets the minor y-axis rulers across the graph.&lt;br /&gt;
: BackgroundColors = canvas:sfondo&lt;br /&gt;
::: The overall color is set to id &amp;quot;sfondo&amp;quot; (defined above), as &amp;quot;value:rgb(1,1,1)&amp;quot; which is white hue, with the RGB (Red/Green/Blue) numbers as &amp;quot;1,1,1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The timeline commands to format the text labels are:&lt;br /&gt;
: bar:1861 at:390 fontsize:XS text: 390 shift:(-8,5)&lt;br /&gt;
::: Here &amp;quot;bar:1861&amp;quot; names the bar to label, at height 390, using fontsize:XS (for extra-small, or &amp;quot;S&amp;quot; as small, or M,L,XL font), with literal text as &amp;quot;390&amp;quot; slightly shifted in position by &amp;quot;shift:(-8,5)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
: TextData=&lt;br /&gt;
: &amp;amp;nbsp; fontsize:S pos:(20,10) text:Data from ISTAT&lt;br /&gt;
::: Command &amp;quot;TextData&amp;quot; sets a note line, here at left-corner X-Y position &amp;quot;pos:(20,10)&amp;quot; with the literal text note &amp;quot;Data from ISTAT&amp;quot;.&lt;br /&gt;
The above descriptions are for the common commands, plus their colon-attributes with values from the example.&lt;br /&gt;
&lt;br /&gt;
For more information, see [[Help:Timeline]], with other examples, showing traditional timeline formats, beyond the bar chart style shown above.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Wikipedia:Graphs and charts]]&lt;br /&gt;
*{{tl|Bar chart}}&lt;br /&gt;
*{{tl|Brick chart}}&lt;br /&gt;
*{{tl|Pie chart}}&lt;br /&gt;
*[[Module:Chart]]&lt;br /&gt;
&lt;br /&gt;
{{Help navigation}}&lt;br /&gt;
{{Wikipedia technical help|collapsed}}&lt;br /&gt;
[[Category:Wikipedia how-to|Bar chart]]&lt;br /&gt;
[[Category:Wikipedia image help|Bar chart]]&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Pythoncoder</name></author>
	</entry>
</feed>