Difference between revisions of "Template:Brick chart/Bricks/sandbox"
Jump to navigation
Jump to search
imported>Wikid77 (put parentheses around {offset}.) |
imported>Wikid77 (fixed to replace mod as "{c} - 10*floor( {c}/10 )" not rounded.) |
||
| Line 11: | Line 11: | ||
float:left; | float:left; | ||
clear:{{#ifexpr:{{{offset|0}}} - {{{stride|10}}} * | clear:{{#ifexpr:{{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{offset|0}}} )/{{{stride|10}}} ) > 0 |none|left}}; | |
height:{{#expr:100/{{{stride|10}}} }}%; | height:{{#expr:100/{{{stride|10}}} }}%; | ||
overflow:hidden; | overflow:hidden; | ||
width:{{#expr: | width:{{#expr: | ||
{{min|{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | {{min|{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} | |
|{{{count|0}}}}} * 100/{{{stride|10}}} }}%; | |{{{count|0}}}}} * 100/{{{stride|10}}} }}%; | ||
"> </div>{{ | "> </div>{{ | ||
#ifexpr:{{{count|0}}} > {{min | #ifexpr:{{{count|0}}} > {{min | ||
|{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | |{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} | |
|{{{count|0}}} }} | |{{{count|0}}} }} | ||
|<!--show full-line bricks--><div style=" | |<!--show full-line bricks--><div style=" | ||
| Line 33: | Line 33: | ||
- {{min | - {{min | ||
|{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | |{{#expr: {{{stride|10}}} - ( {{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{offset|0}}} )/{{{stride|10}}} ) ) }} | |
|{{{count|0}}}}} | |{{{count|0}}}}} | ||
- ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | - ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) | |
) ) }}%<!-- | ) ) }}%<!-- | ||
-->"> </div>{{ | -->"> </div>{{ | ||
#ifexpr: {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | #ifexpr: {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) > 0 | |
|<!--show final bricks (if any)--><div style=" | |<!--show final bricks (if any)--><div style=" | ||
background:{{{color|silver}}}; | background:{{{color|silver}}}; | ||
| Line 48: | Line 48: | ||
height:{{#expr:100/{{{stride|10}}} }}%; | height:{{#expr:100/{{{stride|10}}} }}%; | ||
width:{{#expr: ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | width:{{#expr: ( {{{count|0}}}+{{{offset|0}}} - {{{stride|10}}} * | ||
| − | + | floor( ( {{{count|0}}}+{{{offset|0}}} )/{{{stride|10}}} ) ) | |
* 100/{{{stride|10}}} }}%;<!-- | * 100/{{{stride|10}}} }}%;<!-- | ||
-->"> </div> | -->"> </div> | ||
| Line 71: | Line 71: | ||
-17Sep2012 Fixed overlapped bars by full use of div-tag "overflow:hidden;". | -17Sep2012 Fixed overlapped bars by full use of div-tag "overflow:hidden;". | ||
-17Sep2012 Added "overflow:hidden;" to 3rd line segment to match 1 & 2. | -17Sep2012 Added "overflow:hidden;" to 3rd line segment to match 1 & 2. | ||
| − | -17Sep2012 Allowed decimals by replacing mod as: {c} - 10*( {c}/10 | + | -17Sep2012 Allowed decimals by replacing mod as: {c} - 10*floor( {c}/10 ). |
--> | --> | ||