/** * @param doc * @param g * @param day * @param toDate Last day of diagram. * @param lastNonWorkingDay * @param height */ private void showNonWorkingDays(final Document doc, final Element g, final Date day, final Date toDate, final double height) { if (g == null) { return; } final DayHolder dh = new DayHolder(day); final double x1 = getXValue(day); for (int i = 0; i < 100; i++) { // End-less loop protection. dh.add(Calendar.DAY_OF_MONTH, 1); if (dh.isWorkingDay() == true || dh.before(toDate) == false) { break; } } final double x2 = getXValue(dh.getDate()); g.appendChild(SVGHelper.createRect(doc, x1, 0, x2 - x1, height, SVGColor.LIGHT_GRAY, SVGColor.NONE)); }
label = String.valueOf(quarterCounter); g1.appendChild(SVGHelper.createText(doc, getXValue(day.getDate()), 22, label, "text-anchor", "middle")); ticks.appendChild(SVGHelper.createLine(doc, getXValue(day.getDate()), 12, getXValue(day.getDate()), 20)); } else if (drawTick == true) { ticks.appendChild(SVGHelper.createLine(doc, getXValue(day.getDate()), 15, getXValue(day.getDate()), 20)); } else if (drawTick2 == true) { ticks.appendChild(SVGHelper.createLine(doc, getXValue(day.getDate()), 18, getXValue(day.getDate()), 20)); grid.appendChild(SVGHelper.createLine(doc, getXValue(day.getDate()), 0, getXValue(day.getDate()), xGridHeight));