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.
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">
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() {
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>