• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Bar box/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Bar box
This is the template sandbox page for Template:Bar box (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 8,700 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

{{Bar box}}, is used for construction of horizontal bar charts.

Contents

  • 1 Usage
  • 2 Alternatives to avoid Wikipedia's Post-expand include size limit
  • 3 Tracking category
  • 4 See also

Usage

edit
{{Bar box
|width   =  ''width of the graph''         (optional)
|barwidth=  ''width of the bar area''      (optional, defaults to 100px)
|float   =  (left|right|none)          (optional, defaults to none)
|title   =  ''title of the chart''         (optional)
|titlebar=  ''title bar colour''           (optional, defaults to none)
|left1   =  ''first left column header''   (optional)
|left2   =  ''second left column header''  (optional)
|right1  =  ''first right column header''  (optional)
|right2  =  ''second right column header'' (optional)
|bars    =  ''chart contents''             (see below)
|caption =  ''caption under the chart''    (optional)
}}

Alternatives to avoid Wikipedia's Post-expand include size limit

edit

Pages with many boxes and charts may come close to or exceed Wikipedia's Post-expand include size limit. In these cases consider using Module:Bar as follows:

  • {{Bar box}} → {{#invoke:Bar|box}}
  • {{Bar percent}} → {{#invoke:Bar|percent}}
  • {{Bar pixel}} → {{#invoke:Bar|pixel}}
  • {{Bar log}} → {{#invoke:Bar|log}}
  • {{Bar stacked}} → {{#invoke:Bar|stacked}}
  • {{Bar gap}} → {{#invoke:Bar|gap}}
  • {{Bar table}} → {{#invoke:Bar|table}}

Tracking category

edit
  • Category:Pages using bar box without float left or float right (3,567)

See also

edit
  • {{Vertical bar chart}}
  • {{Bar chart}}
  • {{Data bars}}
  • WP:Graphs
  • v
  • t
  • e
Graph, chart and plot templates
Many types
  • {{#chart}}
  • {{Graph:Chart}}
  • Module:Chart
Graph Extension
  • {{Graph:Chart}}
  • {{Graph:Lines}}
  • {{Graph:Stacked}}
  • {{Map with marks}}
Bar
  • {{Bar chart}}
  • {{Bar box}}
  • {{Bar stacked}}
  • Module:Bar
  • {{Data bars}}
Line
  • {{Graph:Lines}}
Scatter plot
  • {{Dot chart}}
Pie chart
  • {{Pie chart}}
Tree
  • {{Tree chart}}
  • {{Ahnentafel}}
  • {{Clade}}
Stacked
  • {{Stacked bar}}
Cartogram
  • {{Graph:Map}}
  • {{Global Heat Maps by Year}}
Color legends
  • {{Legend}}
  • {{Legend-line}}
  • {{BrewerColorLegends}}
The above documentation is transcluded from Template:Bar box/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Bar_box/sandbox&oldid=1303374247"
Last edited on 30 July 2025, at 16:26

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 30 July 2025, at 16:26 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop