I am trying to use Google Charts to add to a website for my company, and am
running into problems when connecting the Sheet. I started from the basics
and tried to recreate the pie example in the tutorial, but have the chart
load the data from a sheet, rather than creating the table in the code. I
am clearly doing something wrong. When I look at the console, it reads:
Error while parsing the 'sandbox' attribute:
'allow-popups-to-escape-sandbox' is an invalid sandbox flag.
Do I not have something set up correctly?
I know this is probably a very basic question, but I am just starting out
and would appreciate help. Here is my code:
<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1.0', {'packages':['corechart']});
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
var query = new
google.visualization.Query('http://docs.google.com/spreadsheets/d/1WvVr748_MgWa0goyfwlMB2AX_AYtfvXnsLP8N1kyaek');
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
var data = response.getDataTable();
}
var options = {'title':'How Many Donuts I Ate',
'width':400,
'height':300};
var chart = new
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
</script>
</head>
<body>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</body>
</html>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/edab4010-0a56-4fd5-a948-4df794b6e7a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.