Hi I think your problem is the following. You should load the piechart package once (on page load) and then the button should only call the code for drawing the chart. You can also load a few visualization packages in advance and draw only those that are requested by a user request/button etc.
Alternatively, for dynamically loading of the packages (after the page has loaded) you can use the "dynamic loading option" described here http://code.google.com/apis/ajax/documentation/#Dynamic The two methods defer slightly. ChartMan <http://code.google.com/apis/ajax/documentation/#Dynamic> On Sat, Jun 27, 2009 at 2:57 AM, patrickpdk <[email protected]> wrote: > > I am using the sample pie chart from google viz api's page. > > When I load the page from a browser it refreshes properly, however, > when I make an Ajax call to retrieve just the javascript it loads > forever... > > Here's what happens using all hardcoded visualization samples from the > google site: > 1. Web page has hard coded Goog Viz Pie chart. And a "show line chart" > button > 2. Page loads successfully and displays pie chart. > 3. Click the show line chart button --> this replaces Goog Viz Pie > chart with Goog Viz Line chart > 4. Page "loads" forever. > > What is wrong here? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
