Andoza:Composition bar
Ushbu shablon narsaning kichik birliklari bo'yicha raqamli tarkibini aks ettiradi. Masalan, u tez-tez {{Infobox siyosiy partiyasi}} ning bir qismi sifatida ma'lum bir siyosiy partiyaning qonun chiqaruvchi organdagi o'rindiqlari sonini ko'rsatish uchun ishlatiladi. Bitta chiziq, ushbu Andoza moslashuvchan kengligi versiyasi mavjud Andoza:Composition bar compact. A textless, yagona chiziq, ushbu Andoza moslashuvchan kengligi versiyasi mavjud Andoza:tarkibi bar textless.
Ishlatilishi
[manbasini tahrirlash]{{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 #F8F9FA 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.
Namuna
[manbasini tahrirlash]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|{{party color|Green Party (UK)}}}}
|
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
[manbasini tahrirlash]Composition bar uchun TemplateData
A composition bar.
Parametr | Tavsif | Turi | Status | |
---|---|---|---|---|
1 | 1 | The number of sub-units. | Qator | required |
2 | 2 | The total number of sub-units possible. | Qator | required |
3 | 3 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 {{party color|political party}} templates.
| Qator | ixtiyoriy |
Background color | background-color | The background color of the right part of the bar - a valid web color.
| Qator | ixtiyoriy |
Border color | border border-color | The color of the border, or 'none' for no border
| Qator | ixtiyoriy |
Width | width | The width of the bar with units, such as 100% or 10em (unitless numbers are interpreted as px)
| Qator | ixtiyoriy |
Show percent | per | When set to 1 (true), adds a percentage to the bar as well
| Qator | ixtiyoriy |
See also
[manbasini tahrirlash]Yuqoridagi hujjat Andoza:Composition bar/doc sahifasidan olingan. Tajriba oʻtkazish uchun qumloq va test sahifasidan foydalaning. Iltimos, turkumlarni hujjat sahifasiga va intervikilarni vikimaʼlumotlarga joylashtiring. Ushbu andoza ostsahifalari. |