Iterate over group elements


I just started out playing around with KWGT, so please excuse my lack of knowledge about some aspects of it.

I built a sweet little battery usage graph that displays the battery level over the last 12 hours. An Image of it is attached. I used multiple circle shapes in a stacked group (stacked horizontally), and set their vertical position according to the battery charge at that respecitve number of minutes ago.

Now the problem is that the formula to calculate the vertical position is identical for all points except for the date of bi (which is increased systematically). So I went ahead and changed the formula manually for all the 49 dots and felt incredibly stupid (not to talk about the time spent).

There must be a more elegant way to do this, right? Series worked well for displaying the hours at the bottom, but it is apparently only to be used for text elements? I thought of something like utilizing the index of each object in the stacked group as a variable in the formula for the position or something like that.

Thank you very much.

Doing something similar and would like to know as well!

Yes. I just started making widgets today. My second widget is a simple agenda list. Quickly I have found that I have to change the calendar event number in many places when I copy and paste an updated line of code in to each text item in the stack group. Having an index variable would mean I can just paste, without any further editing.