Padron:Composition bar: Pagkakaiba sa mga binago

Content deleted Content added
 
(Walang pagkakaiba)

Kasalukuyang pagbabago noong 07:39, 1 Mayo 2020

50 / 100
Dokumentasyon sa padron [tingnan] [baguhin] [nakaraan] [purga]

This template displays the numeric composition of a thing in terms of its sub-units. For example, it is frequently used as part of {{Infobox political party}} to show the number of seats a given political party holds in a legislature. A single line, flexible width version of this template is available at Template:Composition bar compact.

Usage baguhin

{{Composition bar|amount|total|bar-color|options...}}
amount
The first parameter is the number of sub-units.
total
The second parameter is the total number of sub-units possible.
bar-color
(default is light grey) The third parameter is the background color of the left part of the bar - a valid web color, which can be specified by name, as a hex triplet (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)).
In the case of political parties, most will have their logo color available in {{political party/meta/color}} templates.

Additional display options:

background-color=...
(default is transparent) is the background color of the right part of the bar - a valid web color.
border=...
(default is medium grey) is the color of the border, or "none" for no border
width=...
(default is 100px) a width value for the bar, such as "100%" or "8em" (unitless numbers are interpreted as px)
per=...
(default is false), when set to any value (true), adds a percentage to the bar as well
ref=...
(default is blank), may be used to add a reference/citation for the numbers.

Examples baguhin

Code Result
{{Composition bar|50|100|red}}
50 / 100
{{Composition bar|50|100|red|background-color=#DDD|border=none}}
50 / 100
{{Composition bar|50|100|#99F|width=85%}}
50 / 100
{{Composition bar|50|100|{{Green Party (UK)/meta/color}}}}
50 / 100
{{Composition bar|50|100|rgb(255,255,16)}}
50 / 100
{{Composition bar|75|100|#FF0}}
75 / 100
{{Composition bar|40|100|#F00|per=1}}
40 / 100 (40%)
{{Composition bar|90|100|#F0F0F0|per=1|background-color=#F00}}
90 / 100 (90%)
{{Composition bar|90|100|#F0C|per=1}}
90 / 100 (90%)
{{Composition bar|0|26|hex=#00BFFF|per=1}}
0 / 26 (0%)

TemplateData baguhin

Ito ang TemplateData ng padron na ito na ginagamit ng TemplateWizard, VisualEditor at ng iba pang mga kagamitan. Pindutin ito para makita ang buwanang ulat sa paggamit sa parameter ng padron na ito base sa TemplateData na ito.

TemplateData ng Composition bar

A composition bar.

Mga parametro ng padron[Edit template data]

PangalanPaglalarawanTypeKatayuan
11

The number of sub-units.

Linerequired
22

The total number of sub-units possible.

Linerequired
33 hex

The background color of the left part of the bar - a valid web color, which can be specified by name, as a hex triplet (#rrbbgg), or rgb triplet (rgb(0–255,0–255,0–255)). In the case of political parties, most will have their logo color available in {{political party/meta/color}} templates.

Likas na katakdaan
#CCCCCC
Lineoptional
Background colorbackground-color

The background color of the right part of the bar - a valid web color.

Likas na katakdaan
transparent
Lineoptional
Border colorborder border-color

The color of the border, or 'none' for no border

Likas na katakdaan
#AAAAAA
Lineoptional
Widthwidth

The width of the bar with units, such as 100% or 10em (unitless numbers are interpreted as px)

Likas na katakdaan
100px
Lineoptional
Show percentper

When set to 1 (true), adds a percentage to the bar as well

Likas na katakdaan
0
Lineoptional

See also baguhin

Padron:Progress templates