$options = new Google_Config($chartType); $options->setProperty("width", 550); $chart->draw("data", $options); # init functions $f1 = new Google_Function('drawVisualization'); $f2 = new Google_Function('handleQueryResponse', array('response')); # setup query $q = new Google_Data_Query($url); $q->setQuery($query); $q->send($f2->getName()); $f1->add($q); $f1->setCallBack(); $v->setFunction($f1); # setup response $qr = new Google_Data_QueryResponse(); $qr->asVar($chart->getDataTable())->getDataTable(); $f2->add($qr->render(true)); $chart->setDataTable("visualization"); $f2->add($chart->render()); $v->addFunction($f2); echo $v->render(); ?> </head> <body style="font-family: Arial;border: 0 none;"> <h1>Data Source Requests > Using The Query Language</h1> <div> <form method="post"> <select name="chartType"> <?php foreach ($chartTypes as $name) { ?>