if (employee != null && NumberHelper.isGreaterZero(employee.getWeeklyWorkingHours()) == true) {
workingHoursPerDay = employee.getWeeklyWorkingHours().doubleValue() / 5;
}
final TimesheetDisciplineChartBuilder chartBuilder = new TimesheetDisciplineChartBuilder();
final JFreeChart chart1 = chartBuilder.create(timesheetDao, getUser().getId(), workingHoursPerDay, LAST_N_DAYS, true);
JFreeChartImage image = new JFreeChartImage("timesheetStatisticsImage1", chart1, IMAGE_WIDTH, IMAGE_HEIGHT);
image.add(AttributeModifier.replace("width", String.valueOf(IMAGE_WIDTH)));
image.add(AttributeModifier.replace("height", String.valueOf(IMAGE_HEIGHT)));
body.add(image);
final NumberFormat format = NumberFormat.getNumberInstance(PFUserContext.getLocale());
final String planHours = "<span style=\"color: #DE1821; font-weight: bold;\">"
+ format.format(chartBuilder.getPlanWorkingHours())
+ "</span>";
final String actualHours = "<span style=\"color: #40A93B; font-weight: bold;\">"
+ format.format(chartBuilder.getActualWorkingHours())
+ "</span>";
final String numberOfDays = String.valueOf(LAST_N_DAYS);
final Label timesheetDisciplineChart1Legend = new Label("timesheetDisciplineChart1Legend", getLocalizedMessage(
"personal.statistics.timesheetDisciplineChart1.legend", numberOfDays, planHours, actualHours));
timesheetDisciplineChart1Legend.setEscapeModelStrings(false);
body.add(timesheetDisciplineChart1Legend);
final JFreeChart chart2 = chartBuilder.create(timesheetDao, getUser().getId(), LAST_N_DAYS, true);
image = new JFreeChartImage("timesheetStatisticsImage2", chart2, IMAGE_WIDTH, IMAGE_HEIGHT);
image.add(AttributeModifier.replace("width", String.valueOf(IMAGE_WIDTH)));
image.add(AttributeModifier.replace("height", String.valueOf(IMAGE_HEIGHT)));
body.add(image);
final String averageDifference = "<span style=\"color: #DE1821; font-weight: bold;\">"
+ format.format(chartBuilder.getAverageDifferenceBetweenTimesheetAndBooking())
+ "</span>";
final String plannedDifference = "<span style=\"color: #40A93B; font-weight: bold;\">"