Post your code and a sample of the JSON your data source generates and I'll take a look.
On Thursday, April 26, 2012 9:39:56 PM UTC-4, Tudor wrote: > > I have the same issue. After I made the 3 files the chart doesn't > show. I've tried asgallant's method but no luck. > > On Apr 10, 11:49 am, David Harden <[email protected]> wrote: > > Hello, > > > > I have copied the three files from google's example "Populating Data > Using > > Server-Side Code" under "Connecting Your DataBase" (i.e., > > exampleUsingPHP.html, getData.php and sampleData.json) to my server but > I'm > > having trouble getting the chart to display. > > > > It displays OK if I run getData.php from my browser's address bar > (Firefox > > 11.0 and MacBook) and then copy and paste the json it echos from the > screen > > directly into exampleUsingPHP.html as shown below: > > > > var jsonData = { "cols": [ > > {"id":"","label":"Topping","pattern":"","type":"string"}, > > {"id":"","label":"Slices","pattern":"","type":"number"} ], "rows": [ > > {"c":[{"v":"Mushrooms","f":null},{"v":3,"f":null}]}, > > {"c":[{"v":"Onions","f":null},{"v":1,"f":null}]}, > > {"c":[{"v":"Olives","f":null},{"v":1,"f":null}]}, > > {"c":[{"v":"Zucchini","f":null},{"v":1,"f":null}]}, > > {"c":[{"v":"Pepperoni","f":null},{"v":2,"f":null}]} ] }; > > > > BTW, Google DO NOT show a semi colon after the last curly bracket in > their > > json example file (sampleData.json) and the chart won't display without > it. > > > > So, I think my problem lies with the following ajax function: > > > > var jsonData = $.ajax({ > > url: "getData.php", > > dataType:"json", > > async: false > > }).responseText; > > > > I have read through the JQUERY documentation for jQuery.ajax() but can't > > find anything wrong. Also, I thought maybe ajax didn't like spaces in > its > > json but manually deleting them from sampleData.json didn't help. > > > > Now, I have run out of ideas and would greatly appreciate any help. > > > > David Harden -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/hPQa6aXzgVUJ. 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.
