Thanks for reporting this strange behavior and its solution. We'll investigate..
- VizBoy. On Fri, Mar 6, 2009 at 2:52 AM, David <[email protected]> wrote: > > At the risk of seeming like I'm talking to myself - here is the > solution I came up with: > > In the motion chart example I modify the top to read: > > <script type="text/javascript"> > > var date = new Date(); > var curDate = null; > do { curDate = new Date(); } > while(curDate-date < 1000); > > google.load('visualization', '1', {'packages':['motionchart']}); > google.setOnLoadCallback(drawChart); > > function drawChart() { > var data = new google.visualization.DataTable(); > data.addRows(6); > ....etc. > > The 'date code' above adds a 1 second delay to page before the > javascript is called to load the visualisation. This seems to solve > the problem. The erratic behaviour of it sometimes working suggested > that the problem occurred whenever Flash wasn't loading in the correct > order. The 1 second delay means the div/page is well loaded before > the visualisation is called. > > Bit of a hack... but seems to fix the problem and the delay isn't much > of a problem. > > David > > PS: Just using alert('loading chart'); as the first javascript also > works fine too, but that's a little annoying. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
