use of net.sourceforge.processdash.ev.ci.SingleValueConfidenceInterval in project processdash by dtuma.
the class ConfidenceIntervalMemberCompletionDateChartData method recalc.
public void recalc() {
clearSeries();
lowerBound = upperBound = null;
// see if the user has permission to view personal data in this chart
UserFilter f = GroupPermission.getGrantedMembers(permissionID);
if (f == null)
return;
EVTaskListFilter pf = new EVTaskListGroupFilter(f);
MemberChartNameHelper nameHelper = new MemberChartNameHelper(rollup);
for (int i = 0; i < rollup.getSubScheduleCount(); i++) {
EVTaskList tl = rollup.getSubSchedule(i);
String personalDataID = tl.getPersonalDataID();
if (personalDataID != null && !pf.include(personalDataID))
continue;
String seriesName = nameHelper.get(tl);
// confidence interval
if (maybeAddSeries(tl.getSchedule().getMetrics().getDateConfidenceInterval(), seriesName))
continue;
// if no confidence interval is available, see if this schedule
// is 100% complete. If so, draw a vertical line on the chart.
Date completionDate = tl.getTaskRoot().getActualDate();
if (completionDate != null && maybeAddSeries(new SingleValueConfidenceInterval(completionDate.getTime()), seriesName))
continue;
// if no interval is available and we're less than 100% complete,
// see if they have a forecast date, and draw that as a single
// point on the chart.
Date forecastDate = tl.getSchedule().getMetrics().independentForecastDate();
if (forecastDate != null && !forecastDate.equals(EVSchedule.NEVER))
maybeAddSeries(new SinglePointXYChartSeries(seriesName, forecastDate.getTime(), 0));
}
}
Aggregations