Package org.zkoss.zul

Examples of org.zkoss.zul.SimpleXYModel.addValue()


                ResourceAllocation<?> allocation, BigDecimal taskHours) {
            XYModel xymodel = new SimpleXYModel();

            String title = "percentage";

            xymodel.addValue(title, allocation.getStartDate()
                    .toDateTimeAtStartOfDay().getMillis(), 0);

            for (Stretch stretch : stretches) {
                BigDecimal amountWork = stretch.getAmountWorkPercentage()
                        .multiply(taskHours);
View Full Code Here


            for (Stretch stretch : stretches) {
                BigDecimal amountWork = stretch.getAmountWorkPercentage()
                        .multiply(taskHours);

                xymodel.addValue(title, stretch.getDateIn(allocation)
                        .toDateTimeAtStartOfDay().getMillis(), amountWork);
            }

            return xymodel;
        }
View Full Code Here

            XYModel xymodel = new SimpleXYModel();
            String title = "hours";

            LocalDate previousDate = allocation.getStartDate();
            BigDecimal previousPercentage = BigDecimal.ZERO;
            xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                    .getMillis(), 0);

            for (Stretch stretch : stretches) {
                BigDecimal amountWork = stretch.getAmountWorkPercentage()
                        .subtract(previousPercentage).multiply(taskHours);
View Full Code Here

                if (days > 0) {
                    hoursPerDay = amountWork.divide(new BigDecimal(days),
                            RoundingMode.DOWN);
                }

                xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                        .getMillis(), hoursPerDay);
                if (days > 0) {
                    xymodel.addValue(title, endDate.toDateTimeAtStartOfDay()
                            .getMillis() - 1, hoursPerDay);
                }
View Full Code Here

                }

                xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                        .getMillis(), hoursPerDay);
                if (days > 0) {
                    xymodel.addValue(title, endDate.toDateTimeAtStartOfDay()
                            .getMillis() - 1, hoursPerDay);
                }

                previousDate = endDate;
                previousPercentage = stretch.getAmountWorkPercentage();
View Full Code Here

                previousDate = endDate;
                previousPercentage = stretch.getAmountWorkPercentage();
            }

            xymodel.addValue(title, previousDate.toDateTimeAtStartOfDay()
                    .getMillis() + 1, 0);

            return xymodel;
        }
View Full Code Here

        private XYModel createModelFrom(LocalDate startDate,
                int[] hoursForEachDay) {
            SimpleXYModel result = new SimpleXYModel();
            for (int i = 0; i < hoursForEachDay.length; i++) {
                result.addValue("series",
                        asMilliseconds(startDate.plusDays(i)),
                        hoursForEachDay[i]);
            }
            return result;
        }
View Full Code Here

                            value = value.setScale(2).divide(maxValue,
                                    RoundingMode.DOWN);
                        }
                        LocalDate date = advanceMeasurement.getDate();
                        if ((value != null) && (date != null)) {
                            xymodel.addValue(title, Long.valueOf(date
                                    .toDateTimeAtStartOfDay().getMillis()),
                                    value);
                        }
                    }
                }
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.