javascript - google visualization query can't run maximum and sum query -
i'm trying data fusion tables. when use select query data show successfull. when i'm using sum , maximum query firebug show error : "syntaxerror: syntax error error 500 (there's p"
when test query fusion query query works.
when search based firebug error, it's because i'm not specify script tag script type="text/javascript" .
but think it's not actualy error get, because yesterday code works. , today don't know why code doesn't works.
can me? help.
<!doctype html> <html> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> // fusion table data id var ft_tableid = '1j1ag2s_ignbqmm0qp9yyghfg2_rnszoeh4ee80in'; var ft_tableidsp = '1o5aipnhbcimwsyg0goxierh6el-6byd95nd2pdxr'; google.load('visualization', '1', {'packages':['corechart', 'table', 'geomap']}); function getkp() { // set query using parameters var ft_query_kp = "select 'kelompok penanam', count() "+ft_tableid+" group 'kelompok penanam' order 'idpenanam'"; //var ft_query_kp = "select sum('tinggi pohon') 1o5aipnhbcimwsyg0goxierh6el-6byd95nd2pdxr"; //var ft_query_kp = "select maximum('tinggi pohon') 1o5aipnhbcimwsyg0goxierh6el-6byd95nd2pdxr"; var querytext = encodeuricomponent(ft_query_kp); var query = new google.visualization.query('http://www.google.com/fusiontables/gvizdata?tq=' + querytext); //set callback function query.send(kp); } // set callback run when google visualization api loaded. function kp(response) { if (!response) { alert('no response'); return; } if (response.iserror()) { alert('error in query: ' + response.getmessage() + ' ' + response.getdetailedmessage()); return; } var kpname = response.getdatatable().getvalue(0,0); document.getelementbyid('dropdownkp').innerhtml = kpname; } </script> <script type="text/javascript"> getkp(); </script> </head> <body> <div id="dropdownkp"></div> </body> </html>
we've identified problem in code summaries no second column in projection; pie charts ones allow that, slipped past us. working on fix , update question when it's available.
that said, pie charts resulting such queries wouldn't useful because have single value.
Comments
Post a Comment