TestOrders: Difference between revisions
From MortiWiki
No edit summary |
No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- | |||
Each of these lines lists an 'object' with properties. | |||
The bit after the first colon can be blank unless all the other properties are identical to another object, | |||
which is why the last one has a :1 just for uniqueness. | |||
These can go onto any page in the wiki, so you can have pages for months etc. | |||
These #subobject lines are not visible (except creating a blank line) | |||
--> | |||
{{#subobject:|list=orders|action=plug|points=4|order date=2017/03/11}} | {{#subobject:|list=orders|action=plug|points=4|order date=2017/03/11}} | ||
{{#subobject:|list=orders|action=rubber|points=2|order date=2017/03/12}} | {{#subobject:|list=orders|action=rubber|points=2|order date=2017/03/12}} | ||
Line 8: | Line 16: | ||
{{#subobject:1|list=orders|action=cum|points=-3|order date=2017/03/15}} | {{#subobject:1|list=orders|action=cum|points=-3|order date=2017/03/15}} | ||
Orders: | Orders: | ||
<!-- | |||
This displays a table of all subobjects with 'list=orders'. | |||
The '?points' sets up a column, the last one tidies up (try without it) | |||
--> | |||
{{#ask:[[list::orders]]|?order date|?points|?action|mainlabel=-}} | {{#ask:[[list::orders]]|?order date|?points|?action|mainlabel=-}} | ||
<!-- This sums all the 'points' values for all 'list=orders' objects --> | |||
Total points: {{#ask:[[list::orders]]|?points|format=sum}} | |||
<!-- This is a sort of graph but not so useful as the grouping and labelling not right --> | |||
{{#ask:[[list::orders]] | {{#ask:[[list::orders]] | ||
|?points| | |?points | ||
|?action | |||
|?order date | |||
| | |format=jqplotseries | ||
| | |charttype=bar | ||
}} | }} | ||
__NOCACHE__ | __NOCACHE__ |