Thanks, Mark, this was very helpful but ultimately I didn't need to
use the hack...you were right that it was trying to draw into a div
that was not rendered, so if I had been able to find a good way to get
a callback after things were drawn that probably would have worked.
But I realized that I could do the same thing by calling the callback
function myself, after the calls to addDynamicTab were complete. In
the code above, I just added the last line in this snippet:

  if (tabs == null) {
     var tabdiv = _gel('tabs_div');
     tabs = new _IG_Tabs(__MODULE_ID__, tabnames[0], tabdiv);
     for (i=0; i<tabnames.length; i++) {
        tabs.addDynamicTab(tabnames[i], tabcallback);
     }
     tabcallback(1);
  }

An alert showed me that the first time the callback function was
called, no tabs had been drawn. If I had been adding HTML to the
innerHTML of a div, like the examples show, that would have been no
problem. But since the visualization was drawing in a container that
hadn't been fully set up, it wasn't showing up properly.

On May 6, 1:37 pm, Markw65 <[email protected]> wrote:
> On May 6, 7:37 am, Scott G <[email protected]> wrote:
>
> > I am using dynamic tabs--not
> > because I need to dynamically update the data, but I like using the
> > callback function.
>
> > The problem with drawing the first tab seems to be a problem with
> > getting the right size container (although I've put in an alert
> > statement and gotten back the dimensions I expect). I think I've
> > followed the tab examples,
> > although all the ones I've seen write text rather than draw graphics
> > in each tab container.
>
> I wonder if its the css loading bug again (the callback fires before
> the css has loaded).
>
> See my replies in this 
> thread:http://groups.google.com/group/google-visualization-api/browse_thread...
>
> My issue was with the table visualization. But presumably the same
> problem will show up with others...
>
> Mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
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