Search in sources :

Example 1 with SingleValueConfidenceInterval

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));
    }
}
Also used : EVTaskListFilter(net.sourceforge.processdash.ev.EVTaskListFilter) EVTaskListGroupFilter(net.sourceforge.processdash.ev.EVTaskListGroupFilter) UserFilter(net.sourceforge.processdash.team.group.UserFilter) EVTaskList(net.sourceforge.processdash.ev.EVTaskList) SingleValueConfidenceInterval(net.sourceforge.processdash.ev.ci.SingleValueConfidenceInterval) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 EVTaskList (net.sourceforge.processdash.ev.EVTaskList)1 EVTaskListFilter (net.sourceforge.processdash.ev.EVTaskListFilter)1 EVTaskListGroupFilter (net.sourceforge.processdash.ev.EVTaskListGroupFilter)1 SingleValueConfidenceInterval (net.sourceforge.processdash.ev.ci.SingleValueConfidenceInterval)1 UserFilter (net.sourceforge.processdash.team.group.UserFilter)1