use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.PhaseType in project processdash by dtuma.
the class ProcessAnalysisPage method getTimeByPhaseType.
@//
Chart(//
id = "typeTime", //
type = "area", //
titleKey = "Process.Time_By_Type_Title", format = "stacked=pct\n" + TYPE_COLORS)
public ResultSet getTimeByPhaseType(ChartData chartData) {
ResultSet data = chartData.getEnactmentResultSet(4);
for (PhaseType type : PhaseType.values()) {
int col = type.ordinal() + 1;
data.setColName(col, getRes("Process.Type_" + type));
writePhaseTimePct(data, col, type);
}
return data;
}
use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.PhaseType in project processdash by dtuma.
the class ProcessAnalysisPage method getTimeByPhaseTypeToDate.
@//
Chart(//
id = "typeToDate", //
type = "pie", titleKey = "Process.Time_By_Type_To_Date_Title", format = TYPE_COLORS)
public ResultSet getTimeByPhaseTypeToDate(ChartData chartData) {
ResultSet data = new ResultSet(4, 2);
data.setColName(0, getRes("Process.Type_Header"));
data.setColName(1, getRes("Hours"));
data.setColName(2, getRes("Percent_Units"));
data.setFormat(2, "100%");
double totalTime = chartData.histData.getTime(null, null, true);
for (PhaseType type : PhaseType.values()) {
int row = type.ordinal() + 1;
double time = chartData.histData.getTime(null, type, true);
data.setRowName(row, getRes("Process.Type_" + type));
data.setData(row, 1, num(time / 60));
data.setData(row, 2, num(time / totalTime));
}
return data;
}