Search in sources :

Example 36 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class ProcessAnalysisPage method getTimeInPhaseToDate.

@//
Chart(//
id = "phaseToDate", //
type = "pie", //
titleKey = "Plan.Time_In_Phase_Title", //
smallFmt = "hideLegend=t", format = "colorScheme=consistent\nconsistentSkip=2")
public ResultSet getTimeInPhaseToDate(ChartData chartData) {
    Map<String, DataPair> time = chartData.histData.getTotalTimeInPhase();
    double totalTime = time.remove(WorkflowHistDataHelper.TOTAL_PHASE_KEY).actual;
    List<String> phases = new ArrayList(time.keySet());
    ResultSet data = new ResultSet(phases.size(), 2);
    data.setColName(0, getRes("Phase"));
    data.setColName(1, getRes("Hours"));
    data.setColName(2, getRes("Percent_Units"));
    data.setFormat(2, "100%");
    for (int row = phases.size(); row > 0; row--) {
        String onePhase = phases.get(row - 1);
        data.setRowName(row, onePhase);
        data.setData(row, 1, num(time.get(onePhase).actual / 60));
        data.setData(row, 2, num(time.get(onePhase).actual / totalTime));
    }
    return data;
}
Also used : ArrayList(java.util.ArrayList) ResultSet(net.sourceforge.processdash.data.util.ResultSet) DataPair(net.sourceforge.processdash.util.DataPair)

Example 37 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class ProcessAnalysisPage method getProductivity.

@//
Chart(//
id = "productivity", //
type = "line", titleKey = "Process.Productivity_Title")
public ResultSet getProductivity(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet(1);
    writeProductivity(chartData, data, 1);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 38 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class QualityAnalysisPage method getYield.

@//
Chart(//
id = "yield", //
type = "line", //
titleKey = "Quality.Yield_Title", format = "headerComment=${Quality.Yield_Header}")
public ResultSet getYield(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet(1);
    writeYield(data, 1);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 39 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class QualityAnalysisPage method writeYieldsByPhase.

private ResultSet writeYieldsByPhase(ChartData chartData, boolean process) {
    List<String> phases = chartData.getPhases();
    if (process)
        phases.remove(0);
    Collections.reverse(phases);
    ResultSet data = chartData.getEnactmentResultSet(phases.size());
    for (int col = phases.size(); col > 0; col--) {
        String phase = phases.get(col - 1);
        data.setColName(col, phase);
        data.setFormat(col, "100%");
        for (int row = data.numRows(); row > 0; row--) {
            Enactment e = (Enactment) data.getRowObj(row);
            data.setData(row, col, num(e.actualYield(phase, process)));
        }
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 40 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class QualityAnalysisPage method getDefectsVsAFR.

@//
Chart(//
id = "defectsVsAfr", //
type = "xy", //
params = "phase", titleKey = "Process.Defects_Vs_AFR_Title_FMT")
public ResultSet getDefectsVsAFR(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet(2);
    writeAFR(data, 1);
    writePhaseDefectDensity(chartData, data, 2, chartData.chartArgs[0]);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Aggregations

ResultSet (net.sourceforge.processdash.data.util.ResultSet)57 Enactment (net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment)11 DoubleData (net.sourceforge.processdash.data.DoubleData)5 ArrayList (java.util.ArrayList)4 ListData (net.sourceforge.processdash.data.ListData)3 DataPair (net.sourceforge.processdash.util.DataPair)3 Iterator (java.util.Iterator)2 List (java.util.List)2 Map (java.util.Map)2 PDashQuery (net.sourceforge.processdash.api.PDashQuery)2 PhaseType (net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.PhaseType)2 IOException (java.io.IOException)1 Calendar (java.util.Calendar)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 ServletException (javax.servlet.ServletException)1 DataContext (net.sourceforge.processdash.data.DataContext)1 StringData (net.sourceforge.processdash.data.StringData)1