Are you stopping at the line of code that traces the results?
No, I'm am stopping after it, and stepping all the way through the code.
I also have a for each loop and a for loop - both of which are not entered because the count is 0.
However - and this is the strange bit - sometimes the for loop IS entered, and the count is sometimes 3 or 6. But most of the time it is 0.
It should be constant.
The data is coming from flashvars. In production it will be dynamic, but in development, I am loading it from the html-template file where it is hardcoded.
At the end of the my init() (called on creatioinComplete) I can see that the two piecharts - which I am trying to get data from - have data in their series and legendData.
I am calling the above function right at the end of the init() function, so I dont really understand why the arrays are so often empty, and why it sometimes changes.
Ok,, I found the solution.
I know call the function from the components updateComplete event.
I'd try a clean and rebuild. And make sure the chart variable is pointing
to the right chart.