double value = 0.0D;
String dayLabel = dayFormat.format(ts);
coordinates.setObjectForKey(dayCriteria, dayGroup.masterCriteria().keyDesc());
DRRecordGroup recordGroup = model().recordGroupForCoordinates(coordinates);
if(attribTotalKey != null) {
DRValue drValue = (DRValue) recordGroup.totals().objectForKey(attribTotalKey);
if(drValue != null) {
value = drValue.total();
}
} else {
value = ((Number) recordGroup.rawRecordList().valueForKeyPath(recordGroupTotalToShow())).doubleValue();
}
if(dataset instanceof CategoryDataset) {
((DefaultCategoryDataset)dataset).setValue(value, label, dayLabel);
} else if (dataset instanceof PieDataset) {
((DefaultPieDataset) dataset).setValue(label, value);
} else {
throw new IllegalArgumentException("Neither a Pie nor CategoryDataset");
}
}
} else {
double value = 0.0D;
coordinates.setObjectForKey(dayCriteria, dayGroup.masterCriteria().keyDesc());
DRRecordGroup recordGroup = model().recordGroupForCoordinates(coordinates);
if(attribTotalKey != null) {
DRValue drValue = (DRValue) recordGroup.totals().objectForKey(attribTotalKey);
if(drValue != null) {
value = drValue.total();
}
} else {
value = ((Number) recordGroup.rawRecordList().valueForKeyPath(recordGroupTotalToShow())).doubleValue();
}
if(dataset instanceof CategoryDataset) {