Template:Bar box: Difference between revisions

no edit summary
(Created page with "{{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 =...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1:
<includeonly>{{#switch: {{{float|}}} | left |right=|#default=<table style="margin:{{#ifeq:{{{float|}}}|center|0 auto|0}}; border:none;"><tr><td style="border:none; padding:0;">}}<div class="barbox {{#switch: {{{float|}}} | left = tleft | right = tright|center|none=tnone}}" style="overflow-x: auto;{{{style|}}}">
{{Bar box
<div style="border:{{{border_width|1}}}px solid silver; font-size:88%; padding:0.4em; width:{{{width|auto}}}; background: {{{background-color|white}}};">
|width = width of the graph (optional)
<table style="text-align:left; border-collapse:collapse; width:100%;">
|barwidth= width of the bar area (optional, defaults to 100px)
{{#if:{{{title|}}}|
|float = (left|right|none) (optional, defaults to none)
<tr style="background:{{{titlebar|none}}}"><th style="text-align:center;" colspan="5">{{{title}}}</th></tr>
|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)
}}
<tr style="font-size:88%; height:4px;">
<td {{#if:{{{left2|}}}||colspan="2"}} style="padding:0 4px; text-align:left;">{{{left1|}}}</td>
{{#if:{{{left2|}}}|
<td style="padding:0 4px; text-align:right;">{{{left2}}}</td>
}}
<td style="width:{{{barwidth|100px}}}; text-align:left;"></td>
<td {{#if:{{{right2|}}}||colspan="2"}} style="padding:0 4px; width:1em; text-align:right;">{{{right1|}}}</td>
{{#if:{{{right2|}}}|
<td style="padding:0 4px; text-align:right;">{{{right2}}}</td>
}}
</tr>
{{{bars|}}}
{{#if:{{{caption|}}}|
<tr><td colspan="5" style="padding:5px; text-align:left;">{{{caption}}}</td></tr>
}}
</table>
</div>
</div>{{#switch: {{{float|}}} | left |right=|#default=</td></tr></table>}}{{#switch: {{{float|}}} | left = | right = | #default=[[Category:Pages using bar box without float left or float right|{{#switch:{{{width|auto}}}|auto|=Ω|#default=}}{{PAGENAME}}]]}}</includeonly><noinclude>
{{documentation}}
</noinclude>