• About Good Acts
  • Veterans Resources
  • From Pharms to Farms | A Veteran’s Road to Freedom
  • Petition to Educate the DEA on the Medical Benefits of Cannabis
Good Acts

The best road to progress is freedom's road. - JFK

Texas

Contents

  • 1 Example of a population bar chart
  • 2 Bar chart commands and attributes
  • 3 See also

This page describes techniques for generating a bar chart in a Wikipedia page, by coding a set of numbers in a <timeline>...</timeline> tag format. It can display charts in various formats. The whole image is scaled by a command, e.g. "ImageSize=width:180 height:90", and using the keyword "bar" triggers the bar chart features. However, the {{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.

Here, with the <timeline>...</timeline>, the a vertical bars is formatted by the command "TimeAxis=orientation:vertical" (before specifying the data for the bars). The width of bars is set by "PlotData=width:20". The color of any bar can be set by appending the keyword "color:" (such as "color:lightgrey") at the end of each bar's numeric data.

For other optional parameters, see § Bar chart commands and attributes, or full list at Help:Timeline.

Example of a population bar chart

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).

The above bar chart, showing population bars for each year, can be generated by using the markup text listed below. The example text (below) can be copied and shortened, or expanded, to handle other years or numbers in a bar chart format. The image size is set as "ImageSize = width:450 height:305" for a box of 450x305px. Bar charts can be made simpler by omitting some of the various data options, such as dropping the keyword "at:" ("at:390") which places labels at certain locations on a bar.

<timeline>
Colors=
  id:lightgrey value:gray(0.9)
  id:darkgrey  value:gray(0.8)
  id:sfondo value:rgb(1,1,1)
  id:barra value:rgb(0.6,0.7,0.8)

ImageSize  = width:450 height:305
PlotArea   = left:50 bottom:50 top:30 right:30
DateFormat = x.y
Period     = from:0 till:2000
TimeAxis   = orientation:vertical
AlignBars  = justify
ScaleMajor = gridcolor:darkgrey increment:1000 start:0
ScaleMinor = gridcolor:lightgrey increment:200 start:0
BackgroundColors = canvas:sfondo

BarData=
  bar:1861 text:1861
  bar:1871 text:1871
  bar:1881 text:1881
  bar:1901 text:1901
  bar:1911 text:1911
  bar:1921 text:1921
  bar:1931 text:1931
  bar:1936 text:1936
  bar:1951 text:1951
  bar:1961 text:1961
  bar:1971 text:1971
  bar:1981 text:1981
  bar:1991 text:1991
  bar:2001 text:2001

PlotData=
  color:barra width:20 align:left

  bar:1861 from: 0 till:390
  bar:1871 from: 0 till:401
  bar:1881 from: 0 till:410
  bar:1901 from: 0 till:510
  bar:1911 from: 0 till:604
  bar:1921 from: 0 till:731
  bar:1931 from: 0 till:804
  bar:1936 from: 0 till:833
  bar:1951 from: 0 till:972
  bar:1961 from: 0 till:1125
  bar:1971 from: 0 till:1266  color:blue
  bar:1981 from: 0 till:1227
  bar:1991 from: 0 till:1266
  bar:2001 from: 0 till:1385

PlotData=

  bar:1861 at:390 fontsize:XS text: 390 shift:(-8,5)
  bar:1871 at:401 fontsize:XS text: 401 shift:(-8,5)
  bar:1881 at:410 fontsize:XS text: 410 shift:(-8,5)
  bar:1901 at:510 fontsize:XS text: 510 shift:(-8,5)
  bar:1911 at:604 fontsize:XS text: 604 shift:(-8,5)
  bar:1921 at:731 fontsize:XS text: 731 shift:(-8,5)
  bar:1931 at:804 fontsize:XS text: 804 shift:(-8,5)
  bar:1936 at:833 fontsize:XS text: 833 shift:(-8,5)
  bar:1951 at:972 fontsize:XS text: 972 shift:(-8,5)
  bar:1961 at:1125 fontsize:XS text: 1125 shift:(-8,5)
  bar:1971 at:1266 fontsize:XS text: 1266 shift:(-8,5)
  bar:1981 at:1227 fontsize:XS text: 1227 shift:(-8,5)
  bar:1991 at:1266 fontsize:XS text: 1266 shift:(-8,5)
  bar:2001 at:1385 fontsize:XS text: 1385 shift:(-8,5)

TextData=
  fontsize:S pos:(20,10) text:Data from ISTAT

</timeline>

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 "Data from ISTAT".

Bar chart commands and attributes

Each bar chart command is followed by an equal-sign ("="), while attributes are followed by a colon (":") as in the command "Period = from:0 till:2000" which sets the vertical (y-axis) range from 0-2000.

The timeline commands to format the graph layout are:

ImageSize = width:450 height:305
The numbers 450 and 305 are pixel sizes of the image box.
PlotArea = left:50 bottom:50 top:30 right:30
The PlotArea defines margins around the bar chart inside the image.
DateFormat = x.y
This sets the date format, if needed.
Period = from:0 till:2000
The Period is the range of numbers along the vertical axis (y-axis numbers). Setting attribute "till" larger by 500 (as "till:2500") would compress the bars, as 20% shorter within the image box.
TimeAxis = orientation:vertical
The attribute value as "vertical" displays the bars as upright.
AlignBars = justify
Using command "AlignBars=justify" will auto-widen the bars to fit.
ScaleMajor = gridcolor:darkgrey increment:1000 start:0
Command "ScaleMajor" sets the major y-axis ruler lines across the graph.
ScaleMinor = gridcolor:lightgrey increment:200 start:0
Command "ScaleMinor" sets the minor y-axis rulers across the graph.
BackgroundColors = canvas:sfondo
The overall color is set to id "sfondo" (defined above), as "value:rgb(1,1,1)" which is white hue, with the RGB (Red/Green/Blue) numbers as "1,1,1".

The timeline commands to format the text labels are:

bar:1861 at:390 fontsize:XS text: 390 shift:(-8,5)
Here "bar:1861" names the bar to label, at height 390, using fontsize:XS (for extra-small, or "S" as small, or M,L,XL font), with literal text as "390" slightly shifted in position by "shift:(-8,5)".
TextData=
  fontsize:S pos:(20,10) text:Data from ISTAT
Command "TextData" sets a note line, here at left-corner X-Y position "pos:(20,10)" with the literal text note "Data from ISTAT".

The above descriptions are for the common commands, plus their colon-attributes with values from the example.

For more information, see Help:Timeline, with other examples, showing traditional timeline formats, beyond the bar chart style shown above.

See also

  • Wikipedia:Graphs and charts
  • {{Bar chart}}
  • {{Brick chart}}
  • {{Pie chart}}
  • Module:Chart
Wikipedia help pages
  • Visit the Teahouse or the Help desk for an interactive Q & A forum.

  • FAQs (?)
  • Reference desks (?)
  • Noticeboards (?)
  • Cheatsheet (?)
  • Directories (?)
About Wikipedia (?)
  • Administration
    • Purpose
    • Principles
  • Policies and guidelines
  • What Wikipedia is not
  • Disclaimer (parental advice)
  • Making requests
  • Who writes Wikipedia?
Help for readers (?)
  • FAQ
  • Books
  • Copyright
  • Glossary
  • Mobile access
  • Navigation
  • Other languages
  • Searching
  • Students
  • Viewing media
Contributing
to Wikipedia
 (?)
  • Advice for young editors
  • Avoiding common mistakes
  • Etiquette
  • Simplified Manual of Style
  • Simplified rule-set
    • "Ignore all rules"
    • "The rules are principles"
  • Style-tips
  • Tip of the day
  • Your first article (article wizard)
Getting started (?)
  • Why create an account?
  • Introductions by topic
  • The Wikipedia Adventure
  • Graphics tutorials
    • Picture tutorial
    • IRC (live chat) tutorial
  • VisualEditor user guide
Dos and don'ts (?)
  • Accessibility
  • Biographies
  • Biographies (living)
  • Categorization
  • Consensus
  • Discussions
  • Disambiguation
  • Images
  • Leads
  • Links
  • Lists
  • References
  • Tables
  • Titles (of articles)
How-to pages and
information pages (?)
  • Appealing blocks
  • Article deletion
  • Categories
  • Citations/references
    • Referencing for beginners
    • Citation Style 1
    • Cite errors
    • References and page numbers
  • Convert
  • Diff
  • Editing
    • Minor edit
    • toolbar
    • edit conflict
  • Find sources
  • Files
  • Footnotes
  • Image deletion
  • Infoboxes
  • Linking (link color)
  • Logging in
  • Merging
  • Page name
    • Renaming pages
  • Redirect
  • Passwords
    • Email confirmation
  • Reverting
    • Simple vandalism cleanup
  • Talk pages (archiving)
  • User contributions
  • WP search protocol
Coding (?)
  • Wiki markup
  • Barcharts
  • Calculations
  • Characters
  • Columns
  • Hidden text
  • HTML
  • Lists
  • Magic words
  • Music symbols
  • Sections
  • Sounds
  • Tables
  • Templates
  • Transclusion
  • URL
  • Visual files
Directories (?)
  • Abbreviations
  • Contents (Encyclopedia proper)
  • Departments
  • Editor's index
  • Essays
  • FAQs
  • Glossary
  • Guidelines
  • Manual of Style
  • Policies
  • Tasks
  • Tips
  • Tools
Missing Manual
Ask for help on your talk page (?)
Wikipedia technical help
Get personal technical help at the Teahouse, Help desk, Village pump (technical), talk pages or IRC.
General technical
help
  • Browser notes
    • Bypass cache
    • Keyboard shortcuts
    • Troubleshooting
  • Editing
    • CharInsert
    • Edit conflict
    • Edit toolbar
    • Reverting
  • How to create a page
  • IRC
    • Tutorial
  • Mobile access
  • Multilingual support
  • Page history
  • Page information
  • Page name
    • Help
  • Printing
  • Software notices
    • Editnotice
  • Special Characters
    • Entering
  • User access levels
  • VisualEditor
    • User guide
Special page-related
  • Special page help
  • Edit filter
  • Emailing users
  • Logging in
    • Reset passwords
  • Logs
  • Moving a page
    • Fixing cut-and-paste moves
  • Notifications/Echo
    • FAQ
  • Page Curation
  • Page import
  • Pending changes
  • Random pages
  • Recent changes
  • Related changes
  • Searching
    • Linksearch
  • Tags
  • User contributions
  • Watchlist
  • What links here
Wikitext
  • Wikitext
    • Cheatsheet
  • Columns
  • Line-break handling
  • Lists
  • Magic words
    • For beginners
    • Conditional expressions
    • Switch parser function
    • Time function
  • Redirects
  • Sections and TOCs
  • Tables
    • Introduction
    • Basics
    • Advanced table formatting
    • Collapsing
    • Conditional tables
    • Sorting
  • Using colours
Links and diffs
  • Links
    • Interlanguage
    • Interwiki
    • Permanent
  • Diffs
    • Simplest diff guide
    • Simple diff and link guide
    • Complete diff and link guide
  • Colon trick
  • Link color
  • Magic links
  • Pipe trick
  • URLs
Media files: images,
videos and sounds
  • Media help
  • Files
    • Creation and usage
    • Moving files to Commons
  • Images
    • Introduction to images
    • Picture tutorial
    • Preparing images for upload
    • Uploading images
    • Options to hide an image
    • Extended image syntax
    • SVG help
  • Gallery tag
  • Graphics tutorials
    • Basic bitmap image editing
    • How to improve image quality
    • Graphics Lab resources
  • Sound file markup
  • Visual file markup
Other graphics
  • Family trees
  • Graphs and charts
    • How to create
    • Barcharts
    • To scale charts
  • Math formulas
    • Math symbols
    • LaTeX symbols
    • Rendering math
  • Musical scores
    • Musical symbols
  • Timeline
    • EasyTimeline syntax
  • WikiHiero syntax
Templates and
Lua modules
  • Templates
  • Advanced template coding
  • Template documentation
  • Template index
  • Template limits
  • Template sandbox and test cases
  • Citation templates
  • Lua help
  • Lua project
    • Resources
    • To do
  • Substitution
  • Purge
    • Job queue
  • Transclusion
    • Labeled section
  • Guide to Scribbling
Data structure
  • Namespaces
  • Main/Article
  • Category
  • Draft
  • File
    • File description page
  • Help
  • Portal
  • Project/Wikipedia
  • Talk
    • Archiving
  • Template
  • User
    • User page design
  • MediaWiki
    • Bug reports and feature requests
    • System message
    • TimedMediaHandler extension
  • Module
  • Special
HTML and CSS
  • Cascading Style Sheets
  • HTML in wikitext
  • Catalogue of CSS classes
  • Common.js and common.css
  • User CSS for monospaced coding font
  • Classes in Ambox
  • Classes in microformats
  • Markup validation
  • Span tags
  • Useful styles
Customisation and tools
  • Preferences
  • Gadgets
  • Skins
  • Citation tools
  • Cleaning up vandalism tools
  • Customizing watchlists
    • Hide pages
  • IRC Scripts
  • User scripts
    • Guide
    • Techniques
  • User style
  • Tools
    • Alternative browsing
    • Browser tools
    • Editing tools
    • Navigation shortcuts
    • Optimum tool set
  • Wikimedia Cloud Services
  • Beta Features at MediaWiki
Automated editing
  • AfC helper script
  • AutoWikiBrowser
  • Bots
    • Creating
  • HotCat
  • Huggle
  • Navigation popups
  • RedWarn
  • Twinkle
  • WPCleaner
  • Inactive
    • igloo
    • STiki
  • See also: Category:Wikipedia how-to
  • Category:Wikipedia information pages
    Further navigation at: Help pages
    • Administrators
  • Accessibility
  • Accounts
  • Bots
  • Referencing
    • Citation metadata
  • Templates
  • User scripts
source: https://en.wikipedia.org/wiki/Help:Barchart
  • This page was last edited on 30 May 2018, at 20:39 (UTC).
  • Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
  • Privacy policy
  • About Wikipedia
  • Disclaimers
  • Contact Wikipedia
  • Mobile view
  • Developers
  • Statistics
  • Cookie statement
  • Wikimedia Foundation
  • Powered by MediaWiki

Please consider signing this Petition to Educate the DEA and UN on the medical benefits of Cannabis.

State Resources

  • Texas

    Texas

    January 22, 2018
  • Repetitive Transcranial Magnetic Stimulation | rTMS | Depression Therapy for Veterans at the Waco, Tx. VA

    Repetitive Transcranial Magnetic Stimulation | rTMS | Depression Therapy for Veterans at the Waco, Tx. VA

    February 22, 2019
  • San Diego Vet Centers

    San Diego Vet Centers

    January 22, 2018

Resources

  • VA Administration Sets National Policy Allowing Robotic Prosthetics

    VA Administration Sets National Policy Allowing Robotic Prosthetics

    December 26, 2015
  • VA benefits for Veterans of the Armed Forces of the United States of America

    VA benefits for Veterans of the Armed Forces of the United States of America

    March 18, 2016
  • Human Tissue Regeneration with Pigs Bladder Powder

    Human Tissue Regeneration with Pigs Bladder Powder

    March 18, 2016

Latest Posts

  • The American Legion Urge the Drug Enforcement Agency to License Privately-Funded Medical Marijuana Production Operations in the United States

    The American Legion Urge the Drug Enforcement Agency to License Privately-Funded Medical Marijuana Production Operations in the United States

    September 11, 2016
  • Compassionate Care Act of 2015 in Texas Discriminates Against Veterans

    Compassionate Care Act of 2015 in Texas Discriminates Against Veterans

    March 27, 2016
  • National Second Opinion Day 4/20/16 - All Veterans Ask VA for Second Opinion

    National Second Opinion Day 4/20/16 – All Veterans Ask VA for Second Opinion

    March 18, 2019

FOIA Contacts

  • Veterans Affairs | Veteran Claims File Request

  • Postal Inspection Service

  • USPS Field Office

Copyright © 2021 Good Acts.

Omega WordPress Theme by ThemeHall