Difference between revisions of "Template:Data bars/column"
Jump to navigation
Jump to search
imported>Jonathan Lane Studeman |
imported>WOSlinker (tidy style for better HTML5 compatibility) |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 29: | Line 29: | ||
--->{{#ifexpr:{{{3|0}}}>0| | --->{{#ifexpr:{{{3|0}}}>0| | ||
{{Data bars/bar|title={{#if:{{{detailed|}}}||{{{3|0}}}}}|width={{#expr:{{{scale|1}}}*{{{3|0}}}}}|color={{{color3|#ddd}}}|name=<!---- | {{Data bars/bar|title={{#if:{{{detailed|}}}||{{{3|0}}}}}|width={{#expr:{{{scale|1}}}*{{{3|0}}}}}|color={{{color3|#ddd}}}|name=<!---- | ||
| − | ---------->{{#if:{{{detailed|}}}|{{{3|0}}}|}}}} {{!}} |}}<!--- | + | ---------->{{#if:{{{detailed|}}}|{{{3|0}}}|}}}} |
| + | {{!}} |}}<!--- | ||
--->{{#ifexpr:{{{2|0}}}>0| | --->{{#ifexpr:{{{2|0}}}>0| | ||
{{Data bars/bar|title={{#if:{{{detailed|}}}||{{{2|0}}}}}|width={{#expr:{{{scale|1}}}*{{{2|0}}}}}|color={{{color2|#ddd}}}|name=<!---- | {{Data bars/bar|title={{#if:{{{detailed|}}}||{{{2|0}}}}}|width={{#expr:{{{scale|1}}}*{{{2|0}}}}}|color={{{color2|#ddd}}}|name=<!---- | ||
| Line 43: | Line 44: | ||
--->|color={{{color1|#ddd}}}<!--- | --->|color={{{color1|#ddd}}}<!--- | ||
--->|name=<!---- | --->|name=<!---- | ||
| − | ---------->{{#if:{{{detailed|}}}|{{{1|0}}}|}} | + | ---------->{{#if:{{{detailed|}}}|{{{1|0}}}|}}}} |
| − | {{!}} | + | {{!}} |}} style="vertical-align:bottom;padding-left:2px;padding-bottom:2px;" {{!}} <small><!---------------------- |
--- --- | --- --- | ||
--- adding up the column --- | --- adding up the column --- | ||
| Line 68: | Line 69: | ||
{{!}} | {{!}} | ||
{{{!}} align="center" cellpadding="0" cellspacing="0" | {{{!}} align="center" cellpadding="0" cellspacing="0" | ||
| − | {{!}} | + | {{!}} style="text-align:center;" {{!}} |
{{{!}} cellpadding="0" cellspacing="0" | {{{!}} cellpadding="0" cellspacing="0" | ||
| − | {{!}} width="32px" | + | {{!}} width="32px" style="text-align:center;" {{!}} <sub>{{#expr:<!-------- |
---->{{{1|0}}}<!--- | ---->{{{1|0}}}<!--- | ||
--->+{{{2|0}}}<!--- | --->+{{{2|0}}}<!--- | ||
| Line 118: | Line 119: | ||
{| | {| | ||
| − | |- | + | |- style="vertical-align:top;" |
! style="padding-right:32px;" | Examples: | ! style="padding-right:32px;" | Examples: | ||
| | | | ||
Latest revision as of 23:16, 27 February 2015
This sub-template handles one "column" of data (zero and positive numbers only) to produce a bar for display inside a barchart table.
- No more than eight numbers are accepted as unnamed parameters
- Colors are named color1, color2, color3, and so on, up to eight colors.
- A style number may be specified. If even, the bar is horizontal.
- A scale number may be specified. If so, the bar size in pixels becomes scale times data.
The template call must be enclosed within a table.
| Examples: |
|
|---|