Package org.projectforge.statistics

Examples of org.projectforge.statistics.TimesheetDisciplineChartBuilder.create()


    double workingHoursPerDay = 8;
    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());
View Full Code Here


    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;\">"
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.