use of nl.tudelft.watchdog.core.logic.event.EventStatistics in project watchdog by TestRoots.
the class WatchDogView method createDebugEventGanttChart.
private JFreeChart createDebugEventGanttChart() {
eventStatistics = new EventStatistics(InitializationManager.getInstance().getTrackingEventManager(), selectedDebugInterval);
GanttCategoryDataset dataset = eventStatistics.createDebugEventGanttChartDataset();
JFreeChart chart = ChartFactory.createGanttChart("Debug Events During Selected Debug Interval", "Event", "Time", dataset, false, true, false);
// Scale the chart based on the selected debug interval.
CategoryPlot plot = chart.getCategoryPlot();
ValueAxis axis = plot.getRangeAxis();
axis.setRangeWithMargins(selectedDebugInterval.getStart().getTime() - EventStatistics.PRE_SESSION_TIME_TO_INCLUDE, selectedDebugInterval.getEnd().getTime());
// Give each event type a different color.
plot.setRenderer(new WatchDogGanttRenderer());
return chart;
}
use of nl.tudelft.watchdog.core.logic.event.EventStatistics in project watchdog by TestRoots.
the class WatchDogView method createDebugEventGanttChart.
private JFreeChart createDebugEventGanttChart() {
eventStatistics = new EventStatistics(InitializationManager.getInstance(WatchDogUtils.getProject()).getTrackingEventManager(), selectedDebugInterval);
GanttCategoryDataset dataset = eventStatistics.createDebugEventGanttChartDataset();
JFreeChart chart = ChartFactory.createGanttChart("Debug Events During Selected Debug Interval", "Event", "Time", dataset, false, true, false);
// Scale the chart based on the selected debug interval.
CategoryPlot plot = chart.getCategoryPlot();
ValueAxis axis = plot.getRangeAxis();
axis.setRangeWithMargins(selectedDebugInterval.getStart().getTime() - EventStatistics.PRE_SESSION_TIME_TO_INCLUDE, selectedDebugInterval.getEnd().getTime());
// Give each event type a different color.
plot.setRenderer(new WatchDogGanttRenderer());
return chart;
}
Aggregations