use of nl.tudelft.watchdog.core.logic.event.eventtypes.TrackingEventType in project watchdog by TestRoots.
the class EventStatistics method createDebugEventGanttChartDataset.
/**
* Creates a dataset of all events that occurred during the selected debug
* interval.
*/
public GanttCategoryDataset createDebugEventGanttChartDataset() {
// Create and add the tasks for each event type.
TaskSeries allTasks = new TaskSeries("Debug Events");
for (TrackingEventType type : TrackingEventType.values()) {
final List<EventBase> filteredEventList = events.stream().filter(e -> e.getType() == type).collect(Collectors.toList());
allTasks.add(createTaskForEventsWithName(filteredEventList, type.getTextualDescription()));
}
// Create collection of the overall tasks.
TaskSeriesCollection collection = new TaskSeriesCollection();
collection.add(allTasks);
return collection;
}
Aggregations