|
Fruit | Number | Vegetables | Date | Amount |
---|---|---|---|---|
apples | 10 | onions | 2/1/2010 | 40 |
lemons | 200 | cucumbers | 3/3/2011 | 50 |
oranges | 100 | carrots | 4/3/2012 | 60 |
lemons | 10 | tomatoes | 1/2/2011 | 30 |
berries | 50 | peas | 6/6/2011 | 55 |
apples | 10 | onions | 2/1/2010 | 66 |
lemons | 200 | cucumbers | 3/3/2011 | 66 |
oranges | 100 | carrots | 4/3/2012 | 30 |
lemons | 10 | tomatoes | 1/2/2011 | 22 |
berries | 50 | peas | 6/6/2011 | 77 |
apples | 10 | onions | 2/1/2010 | 77 |
lemons | 200 | cucumbers | 3/3/2011 | 34 |
oranges | 100 | carrots | 4/3/2012 | 56 |
lemons | 10 | tomatoes | 1/2/2011 | 67 |
berries | 50 | peas | 6/6/2011 | 78 |
apples | 10 | onions | 2/1/2010 | 89 |
lemons | 200 | cucumbers | 3/3/2011 | 12 |
oranges | 100 | carrots | 4/3/2012 | 43 |
lemons | 10 | tomatoes | 1/2/2011 | 32 |
berries | 50 | peas | 6/6/2011 | 76 |
apples | 10 | onions | 2/1/2010 | 76 |
lemons | 200 | cucumbers | 3/3/2011 | 87 |
oranges | 100 | carrots | 4/3/2012 | 11 |
lemons | 10 | tomatoes | 1/2/2011 | 22 |
berries | 50 | peas | 6/6/2011 | 6 |
Automatic columns, row and table totals can be added. In addition to sums, the totals can be the count, max, min, mean, median, mode, range, varp, vars, stdevp, and stdevs (click here for a description of these options). The number format can also be set to apply to all totals or specific formats for each. The example below has all three types of totals (column, row and table) as well as variations showing totals based on whether values are hidden or not, including due to filtering.
This code:
{FANCYTABLE(head=" Fruit | Number | Vegetables | Amount" sortable="type:reset" sortList="[0,0],[1,0],[2,y],[3,y],[4,n]" colaligns="left|right|left|right" tsortcolumns="type:text|type:digit|type:word|type:digit" tsfilters="type:text;placeholder:Type to filter...|type:range;from:0;to:200|type:dropdown|type:range;from:5;to:60;style:popup" tsfilteroptions="type:reset" tspaginate="max:5" tstotals="type:col|type:col;filter:hidden|type:col;filter:all|type:all|type:all;filter:hidden|type:all;filter:all|type:row" tstotaloptions="ignore||ignore|" tstotalformat="#,###.")} apples|10 | onions | 40 lemons|200 | cucumbers | 50 ... (leaving out some rows for illustration) lemons |10| tomatoes|22 berries |50 | peas|6 {FANCYTABLE}
Would produce:
Fruit | Number | Vegetables | Amount |
---|---|---|---|
apples | 10 | onions | 40 |
lemons | 200 | cucumbers | 50 |
oranges | 100 | carrots | 60 |
lemons | 10 | tomatoes | 30 |
berries | 50 | peas | 55 |
apples | 10 | onions | 66 |
lemons | 200 | cucumbers | 66 |
oranges | 100 | carrots | 30 |
lemons | 10 | tomatoes | 22 |
berries | 50 | peas | 77 |
apples | 10 | onions | 77 |
lemons | 200 | cucumbers | 34 |
oranges | 100 | carrots | 56 |
lemons | 10 | tomatoes | 67 |
berries | 50 | peas | 78 |
apples | 10 | onions | 89 |
lemons | 200 | cucumbers | 12 |
oranges | 100 | carrots | 43 |
lemons | 10 | tomatoes | 32 |
berries | 50 | peas | 76 |
apples | 10 | onions | 76 |
lemons | 200 | cucumbers | 87 |
oranges | 100 | carrots | 11 |
lemons | 10 | tomatoes | 22 |
berries | 50 | peas | 6 |
In a simpler example, all you need to do is set sortable
to y
, in addition to being able to sort each column, you also get a line with fields to filter your data by matching a search string in one or more columns.
Example from http://i18n.tiki.org/Status :
This code:
{FANCYTABLE(head="Language code (ISO)|English name|Native Name|Completion|Percentage|Number of strings", sortable="y")} ar | Arabic | اÙعربÙØ© | {gauge value="2,29" size="100" showvalue="false"} | 2,29% | Total: 14923 %%% Translated: 341 %%% Untranslated: 14582 bg | Bulgarian | бÑлгаÑÑки език | {gauge value="0,01" size="100" showvalue="false"} | 0,01% | Total: 14922 %%% Translated: 2 %%% Untranslated: 14920 ca | Catalan | Català | {gauge value="39,22" size="100" showvalue="false"} | 39,22% | Total: 14996 %%% Translated: 5882 %%% Untranslated: 9114 ... {FANCYTABLE}
Would produce (upper part):
Then you can sort by one or more columns, and filter you results by searching for some string in one or more columns. In the example below, sorted by one column ("Percentage"), and filtered by content in another column ("Native name" containing "de"):
If the cell begins with (multiple) \, then the cell spans (multiple) rows. Define lesser cols in the following rows.
If the cell begins with (multiple) /, then the cell spans (multiple) cols. Define lesser cols in this row.
This code:
{FANCYTABLE( head=" Col 1 | Col 2 ")} \\1,1 (spans 2 rows)|1,2 2,2 //3,1 (spans 2 cols) {FANCYTABLE}
Would produce:
Col 1 | Col 2 |
---|---|
1,1 (spans 2 rows) | 1,2 |
2,2 | |
3,1 (spans 2 cols) |