My working code is below, but it chokes when I add more than 5 queries. Can anyone offer some guidance?
var dataA = "";
var dataB = "";
function initialize() {
var opts = {sendMethod: 'auto'};
var queryString = encodeURIComponent('SELECT J, K, C, E, F WHERE I=1');
var queryA = new google.visualization.Query(
'https://docs.google.com/spreadsheets/d/xxx=' + queryString);
var queryB = new google.visualization.Query(
'https://docs.google.com/spreadsheets/d/xxx=' + queryString);
queryA.send(handleQueryResponse);
queryA.send(getDataA);
queryB.send(getDataB);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}
}
function getDataA(response){
dataA = response;
drawThatChart();
}
function getDataB(response){
dataB = response;
drawThatChart();
}
function drawThatChart(){
drawChart(dataA, dataB);
}
function drawChart(a, b) {