Hi all,
  I was wondering if anyone can help me out. Biscally, this code isn't
working:

GDownloadUrl("xml.php",
                        function(xmlData, responseCode) {
                                if(responseCode == 200) {
                                        var xml = GXml.parse(xmlData);
                                        var customers =
xml.documentElement.getElementsByTagName("customer");
                                        for (var i = 0; i < customers.length; 
i++) {
                                                var name = 
customers[i].getAttribute("name");
                                                var profit = 
customers[i].getAttribute("profit");
                                                alert(profit);
                                                data.addRows([
                                                                        [name, 
profit]
                                        ]);

                                }
                        }
                        });

                var chart = new
google.visualization.PieChart(document.getElementById('sales_chart'));
                chart.draw(data, {width: 400, height:240, is3D: true, title: 
'Sales
Record'});

It keeps displaying 'no data' but when I inspect xml.php via Firebug
and also using the javascript alert() function within the code, I see
the data but it's not drawing the chart.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to google-visualization-...@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to