DRSubMasterCriteria mainSubMasterCriteria = (DRSubMasterCriteria) mainGroup.masterCriteria().subCriteriaList().lastObject();
String mainKey = mainSubMasterCriteria.keyDesc();
NSArray mainCriterias = mainGroup.sortedCriteriaList();
for (Enumeration values = mainCriterias.objectEnumerator(); values.hasMoreElements();) {
DRCriteria mainCriteria = (DRCriteria)values.nextElement();
String label = (String) mainCriteria.valueDict().objectForKey(mainKey);
coordinates.setObjectForKey(mainCriteria, mainGroup.masterCriteria().keyDesc());
if(!mainCriteria.isTotal()) {
for (Enumeration days = dayCriterias.objectEnumerator(); days.hasMoreElements();) {
DRCriteria dayCriteria = (DRCriteria)days.nextElement();
Object o = dayCriteria.valueDict().objectForKey(dayKey);
if(!dayCriteria.isTotal()) {
// we just want the actual times, not the totals
if(o instanceof NSTimestamp) {
NSTimestamp ts = (NSTimestamp)o;
if(ts != null) {
double value = 0.0D;