Hi,

I'm trying to show a simple Line Chart by querying a 2-column dataset
of 130 records.  The first column is a date, the second one a value
corresponding to the date.  You may find the spreadsheet page at:

http://spreadsheets.google.com/pub?key=tM0t3U1FfvsGypMlD_lEePw&single=true&gid=2&output=html

When I select up to 20 records or so to be treated with the
Visualization API, the dataset is processed readily.  But with more
than 20 records or so (there is 132 records in all), my chart comes
out empty, without any error being alerted.

Since I only want to show in the chart the last 10 days of data, I
coded the following.  The code is functioning properly with < 20
records, but with more than 20, the x-axis shows the last 10 days, but
the chart is still empty.

/
***************************************************************************/

function drawChart() {
        var query = new google.visualization.Query('http://
spreadsheets.google.com/tq?
range=A2:B50&headers=-1&key=0ApZfIRHIB6uCdE0wdDNVMUZmdnNHeXBNbERfbEVlUHc&gid=2'),
        now = new Date(),
        oneDay = 24*60*60*1000,
        numberOfDays = 10,
        daysAgo,dateString,todayString,dd,mm,aa;
        daysAgo = new Date(now-oneDay*numberOfDays);
        dd = daysAgo.getDate();
        dd = dd<10?'0'+dd:dd;
        mm = daysAgo.getMonth()+1;
        mm = mm<10?'0'+mm:mm;
        aa = daysAgo.getFullYear();
        dateAgoString = aa+'-'+mm+'-'+dd;
        dd = now.getDate();
        dd = dd<10?'0'+dd:dd;
        mm = now.getMonth()+1;
        mm = mm<10?'0'+mm:mm;
        aa = now.getFullYear();
        todayString = aa+'-'+mm+'-'+dd;
        query.setQuery('SELECT A,B WHERE A >= date "'+dateAgoString+'" and A
<= date "'+todayString+'" ORDER BY A');
        query.send(handleQueryResponse);
}
/
***************************************************************************/

What am I doing wrong, or is there a limitation to the number of
records?

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to