Hi Tom, I'm facing the same problem. Just to add up to description here, I figured out if I view my code in chart wizard or copy and paste the link created by chart wizard<http://chart.apis.google.com/chart?chxl=1:%7CScore%7C3:%7CAmount&chxp=1,100%7C3,100&chxr=0,-3.333,100%7C1,1.667,100%7C2,6.667,1500%7C3,6.667,100&chxs=1,676767,11.5,-1,l,676767%7C3,676767,11.5,1,l,676767&chxt=x,x,y,y&chs=300x230&cht=s&chco=008000&chds=0,100,10,100,-25,100&chd=t:25,12,40,30,80%7C36.739,54.342,90.194,67.44,71.32%7C54.231,47.7,79.848,66.135,68.304&chdl=Top10&chdlp=b&chg=20,20,10,4&chma=%7C5&chm=r,FF0000,0,0.2,0.21,-1%7CR,FF0000,0,0.3,0.31&chtt=ScoreCard>, the points are perfectly rendered, but if I copy and paste the same code (Click the Embed with Visualization API and copy/Paste the HTML) in the google code playground <http://code.google.com/apis/ajax/playground/> or my php file, then the points disappear from the chart. Also I get this at the end of the Chart "google.setOnLoadCallback(drawVisualization); " May anyone have already figured out why ?
Cheers, Arshia On Friday, July 23, 2010 8:03:48 PM UTC+10, tvladeck wrote: > > Hi, > > Disclaimer: I am not a programmer, although I have done a very small > amount of amateur coding. I am trying to make a nice scatter plot for > my master's thesis that will display a ton of points in different > colors and different sizes. The google charts tool seems perfect for > this, although I have had a few problems getting it to work. My > dataset is simply too large to use a GET request as the URL will > inevitably be above 2k characters; I have not been able to figure out > how to do a POST request, although that may be for another time. I > tried using the Chart Wizard to automatically write the HTML that > would get me my scatter chart, but when I open the file containing the > text (below) the 'points' in the scatter chart aren't rendered. The > axes and everything else are, but not the points. The code below comes > straight from the Chart Wizard's default settings. I tried using it in > the Visualization playground and opening it in Firefox, with the same > result for both. Any help would be appreciated. Thanks so much. > > Kind regards, > Tom > > > <html> > <head> > <title> Example Chart </title> > <script language="javascript" src="http://www.google.com/jsapi"></ > script> > </head> > <body> > > <div id="chart"></div> > > <script type="text/javascript"> > var queryString = ''; > var dataUrl = ''; > > function onLoadCallback() { > if (dataUrl.length > 0) { > var query = new google.visualization.Query(dataUrl); > query.setQuery(queryString); > query.send(handleQueryResponse); > } else { > var dataTable = new google.visualization.DataTable(); > > draw(dataTable); > } > } > > function draw(dataTable) { > var vis = new > google.visualization.ImageChart(document.getElementById('chart')); > var options = { > chxl: '', > chxp: '', > chxr: '', > chxs: '', > chxtc: '', > chxt: 'x,y', > chs: '300x150', > cht: 's', > chco: 'FF9900', > chd: 't:12,87,75,41,23,96,68,71,34,9| > 98,60,27,34,56,79,58,74,18,76|84,23,69,81,47,94,60,93,64,54', > chdl: '' > }; > vis.draw(dataTable, options); > } > > function handleQueryResponse(response) { > if (response.isError()) { > alert('Error in query: ' + response.getMessage() + ' ' + > response.getDetailedMessage()); > return; > } > draw(response.getDataTable()); > } > > google.load("visualization", "1", {packages:["imagechart"]}); > google.setOnLoadCallback(onLoadCallback); > > </script> > </body> > </html> > -- You received this message because you are subscribed to the Google Groups "Google Chart API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-chart-api/-/uENw0BVKqb4J. 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-chart-api?hl=en.
