Hello, thanks for the response!
The idea of the loop was to avoid manually putting in the suffix, color, index, allbars, fontSize over and over again to put a marker at the end of each bar. If you do not put values for each index (data set) you will only get markers at the end of one bar, instead of all. I had achieved this before and unfortunately google gadget editor ate the code so now I'm trying to remake it but drawing a blank.
So the intent is to have the loop basically build the "1,2,3|9,8,7" for you as it goes through each time, except that index (counting) is the only number changing, everything else stays the same.
The labelstring.join(',') outside of the loop is attaching the string/array we've just created to the options variable above in the code. If you comment out the loop and just have the [suffix, color, index, allbars, fontSize] just assign to labelString as is with no fancy other stuff, it works, it's just when things start getting played with in the loop. However due to only one index being accounted for, as you can see below, we only have one label.
