Difference between revisions of "Template:Bartable"
From Gramps
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{2|}}} | {{#if:{{#titleparts:{{{2}}}|1|2}}|{{#if:{{#titleparts:{{{2}}}|1|1}}|{{{1}}}{{{2}}}|{{convert|{{{1}}}|{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|3}}|{{#titleparts:{{{2}}}|1|4}}|abbr=on}} }}|{{{1}}}{{{2}}} }} | {{{1|—}}} }} {{#ifexpr:{{#if:{{{3|}}}|{{{3}}}|0}}<0 | {{!}}{{!}} {{#ifexpr:{{formatnum:{{{1|0}}}|R}}<0 | align="right" {{!}} <div style="width:{{#expr:-abs({{#if:{{{3|}}}|{{{3}}}|1}})*{{formatnum:{{{1}}}|R}} }}px;height:{{#if:{{{4|}}}|{{{4}}}|2ex}};background:#aaa;{{{5|}}}"> </div>|}} | }} | <includeonly>{{#if:{{{2|}}} | {{#if:{{#titleparts:{{{2}}}|1|2}}|{{#if:{{#titleparts:{{{2}}}|1|1}}|{{{1}}}{{{2}}}|{{convert|{{{1}}}|{{#titleparts:{{{2}}}|1|2}}|{{#titleparts:{{{2}}}|1|3}}|{{#titleparts:{{{2}}}|1|4}}|abbr=on}} }}|{{{1}}}{{{2}}} }} | {{{1|—}}} }} {{#ifexpr:{{#if:{{{3|}}}|{{{3}}}|0}}<0 | {{!}}{{!}} {{#ifexpr:{{formatnum:{{{1|0}}}|R}}<0 | align="right" {{!}} <div style="width:{{#expr:-abs({{#if:{{{3|}}}|{{{3}}}|1}})*{{formatnum:{{{1}}}|R}} }}px;height:{{#if:{{{4|}}}|{{{4}}}|2ex}};background:#aaa;{{{5|}}}"> </div>|}} | }} | ||
| − | | {{#ifexpr:{{formatnum:{{{1|0}}}|R}}>0 | align="left" {{!}} <div style="width:{{#expr:abs({{#if:{{{3|}}}|{{{3}}}|1}})*{{formatnum:{{{1}}}|R}} }}px;height:{{#if:{{{4|}}}|{{{4}}}|2ex}};background:#aaa;{{{5|}}}"> </div>|}}</includeonly><noinclude><br><br>This template adds an inline bar graph to tables with numeric (including negative) values that a reader may wish to compare.<br>Use this template inside a table.<br>See the [ | + | | {{#ifexpr:{{formatnum:{{{1|0}}}|R}}>0 | align="left" {{!}} <div style="width:{{#expr:abs({{#if:{{{3|}}}|{{{3}}}|1}})*{{formatnum:{{{1}}}|R}} }}px;height:{{#if:{{{4|}}}|{{{4}}}|2ex}};background:#aaa;{{{5|}}}"> </div>|}}</includeonly><noinclude><br><br>This template adds an inline bar graph to tables with numeric (including negative) values that a reader may wish to compare.<br>Use this template inside a table.<br>See the [[Template:Bartable\example]]<br>Copy of [https://en.wikipedia.org/wiki/Template:Bartable Template:Bartable] From Wikipedia[[Category:Templates]]</noinclude> |
Revision as of 00:49, 19 May 2020
This template adds an inline bar graph to tables with numeric (including negative) values that a reader may wish to compare.
Use this template inside a table.
See the Template:Bartable\example
Copy of Template:Bartable From Wikipedia