I created a custom modifier for the group key that truncates a
datetime field to 15 minute intervals and it gets called more than I
expect. This is OK with firefox and chrome, but with browsers that
don't like long running javascript, it is becoming a problem. The
modifier seems to be called ((NumberOfRows of the input datatable)-1)
*5 + (NumberOfRows of Resultant datatable) + 1
If I get 1631 rows from a query against a google spreadsheet and it
results in 802 keys, my modifier function gets called 8953 times!
Is this expected? Is there a more efficient way to do this?
Below are the snippets of javascript
var timeGroupedData = google.visualization.data.group(data,[{'column':
0, 'modifier':whichQuarterHour, 'type':'datetime'}],[{'column': 0,
'aggregation': google.visualization.data.count, 'type': 'number'}]);
function whichQuarterHour(someDate) {
someDate.setMinutes(Math.floor(someDate.getMinutes()/15) * 15);
someDate.setSeconds(0);
someDate.setMilliseconds(0);
gqcounter +=1;
return someDate;
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---