Difference between revisions of "Template:Bar chart/bar/doc"

From blackwiki
Jump to navigation Jump to search
imported>Tahir mq
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
+
<!-- Categories at the bottom of this page, please -->
  
 
This template can be used to create bars for a horizontal bar chart.
 
This template can be used to create bars for a horizontal bar chart.
 +
 
== Usage ==
 
== Usage ==
 
:<code><nowiki>{{</nowiki>Bar chart/bar| ''data'' | ''total'' | width = ''width'' | width_units = ''width_units'' | color = ''color'' <nowiki>}}</nowiki></code>
 
:<code><nowiki>{{</nowiki>Bar chart/bar| ''data'' | ''total'' | width = ''width'' | width_units = ''width_units'' | color = ''color'' <nowiki>}}</nowiki></code>
Line 13: Line 14:
 
== See also ==
 
== See also ==
 
* {{tl|Bar chart}} &ndash; uses this template to generate bar charts.
 
* {{tl|Bar chart}} &ndash; uses this template to generate bar charts.
* {{tl|Infobox political party/seats}} &ndash; used for displaying the number of seats held by a political party.
+
* {{tl|Composition bar}} &ndash; used for displaying the number of seats held by a political party, or other single statistics.
 +
 
 +
<includeonly>{{Sandbox other|
 +
| <!-- Categories below this line, please: -->
 +
[[Category:Bar chart templates]]
  
<includeonly>
 
<!-- Categories and interwikis go here: -->
 
 
[[bs:Šablon:Trakasti grafikon/traka]]
 
[[bs:Šablon:Trakasti grafikon/traka]]
 
[[mk:Шаблон:Столбен графикон/столб]]
 
[[mk:Шаблон:Столбен графикон/столб]]
 
[[ur:سانچہ:Bar chart/bar]]
 
[[ur:سانچہ:Bar chart/bar]]
</includeonly>
+
}}</includeonly>

Latest revision as of 23:37, 23 April 2020

This template can be used to create bars for a horizontal bar chart.

Usage

{{Bar chart/bar| data | total | width = width | width_units = width_units | color = color }}
  • width is a number which determines the maximum width of the bar
  • width_units are the units associated with the width (em, px, or %). The default is em.
  • data and total are used to determine the width of the bar using data/total to compute a percentage of width.
  • data is also used for the label on each bar.
  • color is used to override the default bar color.

See also

  • {{Bar chart}} – uses this template to generate bar charts.
  • {{Composition bar}} – used for displaying the number of seats held by a political party, or other single statistics.