View Full Version : Flash chart in TabPanel

7 Jun 2011, 4:42 AM
I'm working with ExtJS 3.2.1 (because of GeoExt compatibility) and OpenFlashChart 2 for charting data.

I have put the OpenFlashChart SWF component on a panel in a TabPanel and am encountering problems: whenever I change to another tab, and switch back, the SWF chart is not restored in its previous state. Even worse, the Flash component seems to be unloaded since function calls do not work anymore ("... is not a function").

What is the correct way to cope with this? I've seen mentions of "deferredRender" and "hideMode" options, but I don't yet get how they work exactly.

Can someone enlighten me on this?

Thanks a lot for your help,

9 Jun 2011, 11:19 PM
When you change tabs the other tabs need to be hidden. hideMode allows you to choose which technique is used to do this hiding. Some hide modes can cause embedded objects such as Flash to go crazy in certain browsers. Just try experimenting with the different options to see if one of them helps, my guess would be that offsets is the most likely to work. Note it'll be the child item that requires the setting, not the tabpanel itself.

deferredRender seems unlikely to be the cause of your problem. This option allows unseen tabs to be left unrendered until they are shown. However, once they are shown it has no further effect.