I’ve been busy integrating charts into FormLis. Heres how they look together. Isn’t that lovely?
Plots describe how views are transformed into (X & Y) pairs. ON “/*/” leaf-totals ; slices the data up into multiple plots. In this case 1 plot per top level group (e.g. Tom, Peggy, etc). Its the pink boxes in the view above. I’m using the leaf-totals as data because they contain my daily sum (I’ve highlighted them in white). Leaf-totals means the same as the sub-sub-sub-sub-totals. I could have chosen to use the rows or the overall totals.
I want to restrict the plot to just todays data, which is the first row in each group, so I say LIMIT 1 ;.
Each of these rows will produce several (X &Y) pairs. For example Tom’s row will produce (“Protein” & 12), (“Grains” & 6), (“Vegatables” & 2.5) etc. So I say POINTS-PER-ROW 6 ;
Lastly, I have to tell FormLis how to compute the X & Y values. That’s what the X and Y functions above do. X says “take the point number (p#), if its zero -> Protein, if its 1 -> Grains, etc”. Y says take the point number, add 5, and use that column’s data.