You can give them a class or an id. That way you can address them separately.
Bars[i] = sym.createChildSymbol("Dot", "Chart");
// address class with a dot and id with a # example sym.getSymbol('#bar'+i)....
Thanks very much for the quick reply!
I'll give it a whirl...
I'd love to be able to do this, but must have gotton something wrong...
When I include in the loop:
I get the following message in the console:
SCRIPT438: Object doesn't support property or method 'attr'
Thanks very much for your help!!!
1 person found this helpful
add jQuery to use class and attr.
I have js/jquery-2.0.3.min.js included under Scripts in this EA file.
Do I need something different than that?
Thanks so much again!!
Nope. This is the correct version. Not sure why you are getting this message. I use this all the time without any problem. Did you remember to use the # after when you use the ids after?
I never get that far.
I get the Object doesn't support property or method 'attr' message when I put in the line
I've managed to work around the problem so far, but it is pretty frustrating.
I really wish this thing worked more like Flash ActionScript used to. (Thank you, Mr. Jobs!)
Anyway, thanks so much for your help and patience. I don't know what I would do without these forums and generous souls like yourself.
Thanks. Not sure why you had problem with this. I use this all the time. What was your work around?
I created an array to hold the settings for each of the bars and then built the bars one at a time by looping through the array. So I never had to reference an individual element by ID. Kind of funky, but it worked.
Bars[i] = sym.createChildSymbol("PmtDot", "Chart");
Bars[i].$("pmtBar").css ('height', pmtBarHeight);
Bars[i].$("pmtBar").css ('width', 10);
xPos = xPos + 28;
} //end for