I have some code that is basically like this:

var finished = {};
var listeners = {};
for (x in charts) {
    listener[x] = google.visualization.events.addListener(charts[x]['chart']
, 'ready' function () {
        finished[x] = true;
        // further processing
        google.visualization.events.removeListener(listener[x]);
    });
    charts[x]['chart'].draw(charts[x]['data'], charts[x]['options']); 
}

which works fine in Chrome and IE.  In Firefox, when the event listeners 
fire, they almost always have x equal to the last element in the charts 
object (occasionally, they have x equal to an earlier element, but never 
the correct one).  The net result is:
a) I can never tell when all of the charts have finished drawing
b) the event handlers for most of the charts stick around to potentially 
cause problems on redraw

Anyone have any ideas on how I can work around this?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/gtuC6PYjt_oJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to