Hello, I was having a similar problem, and I have tried to use your solution to get my motion chart to plot the way I would like it to look - and it worked. However I cannot figure out how to get it on my website.
When I use my google spreadsheet to plot the data using the google motion chart gadget, I am able to get it to plot TIME on the x axis (which I have as column B in the spreadsheet), and one of my selected indicators on the Y axis (column C). When I add this google gadget to my iGoogle, it publishes just fine, maintaining my selections. However, when I try to "publish" the gadget from my google spreadsheet, and copy the html script into my website script, the gadget does not display the way I had set it up, and it goes back to plotting two of the indicators against eachother (Column C as X-axis, Column D as Y-axis). (The bubble sizes are also not doing what I wanted either.) When I tried putting it into AJAX as Davide suggested, I was able to get my data to come up in a gadget, and the formatting is what I want also. But I don't know how I can embed this into my website. Any ideas? Thanks, Christi On Mar 31, 7:38 am, dawide <[email protected]> wrote: > sorry, I managed to get what I wanted > maybe my explanation was not clear enough. > > Instead of creating agadgeton the spreadsheet and then embedding it > in an html page I used the AJAX API > > like this: > > function drawVisualization() { > new google.visualization.Query( > 'http://spreadsheets.google.com/tq?key=pCQbetd- > CptE1ZQeQk8LoNw').send( > function(response) { > new google.visualization.MotionChart( > document.getElementById('visualization')). > draw(response.getDataTable(), {'width': 800, 'height': > 400}); > }); > > } > > and added the state string to the draw options > > draw(response.getDataTable(), {'width': 800, 'height': 400, 'state': > 'your state string'}); > > Davide > > On Mar 31, 9:04 am, VizBoy <[email protected]> wrote: > > > Hi, > > > I do not understand... > > Did you manage to do what you wanted, or not? > > > - VizBoy. > > > On Mon, Mar 30, 2009 at 7:27 PM, dawide <[email protected]> wrote: > > > > What I wanted is very easy to achieve using javascript. > > > > I used the code from this page > > >http://code.google.com/apis/ajax/playground/?type=visualization#motio... > > > put in my spreadsheet key and added the state string to the draw > > > options > > > > Hope this helps, > > > Davide > > > > On Mar 25, 7:01 pm, VizBoy <[email protected]> wrote: > > > > Hi, > > > > This is not yet supported but is on our feature request list. > > > > Please keep an eye on the release notes. > > > > > - VizBoy. > > > > > On Wed, Mar 25, 2009 at 11:36 AM, dawide <[email protected]> wrote: > > > > > > Hi, > > > > > how can I publish on a web page amotionchartgadgetwith a custom > > > > > view instead of the default view? > > > > > > Basically I would like to use the state string (settings - advanced) > > > > > > {"xZoomedDataMax":20,"orderedByX":false,"time":"2006","xLambda": > > > > 0,"orderedByY":false,"sizeOption":"4","xZoomedIn":false,"nonSelectedAlpha": > > > > > 0.5,"showTrails":true,"yLambda":0,"dimensions":{"iconDimensions": > > > > > ["dim0"]},"yZoomedIn":false,"stateVersion": > > > > > 3,"iconType":"BUBBLE","xZoomedDataMin":0.05,"yZoomedDataMax": > > > > > 54.8936170212766,"yZoomedDataMin":0,"iconKeySettings":[],"duration": > > > > > {"timeUnit":"Y","multiplier": > > > > 1},"xAxisOption":"3","colorOption":"5","yAxisOption":"9","playDuration": > > > > > 15} > > > > > > together with the code to be pasted in any html page: > > > > > > <script src="http://spreadsheets.google.com/gpub?url=http%3A%2F > > > > > %2Foj0ijfii34kccq3ioto7mdspc7r2s7o9.spreadsheets.gmodules.com > > > %2Fgadgets > > > > > %2Fifr%3Fup__table_query_url%3Dhttp%253A%252F > > > > > %252Fspreadsheets.google.com%252Ftq%253Frange > > > > > %253DA1%25253AK5114%2526headers%253D-1%2526gid%253D0%2526key > > > > > %253DpEFbUSI2qKVpeNTUqU9WfGA%2526pub%253D1%26up_title%3D%26up_state%3D > > > > > %26up__table_query_refresh_interval%3D0%26url%3Dhttp%253A%252F > > > > > %252Fwww.google.com%252Fig%252Fmodules > > > > > %252Fmotionchart.xml&height=815&width=1281"></script> > > > > > > Thank you for your help, > > > > > Davide > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
