diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/GraphicForStreches.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/GraphicForStreches.java index f6582d793..26bf98102 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/GraphicForStreches.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/GraphicForStreches.java @@ -55,26 +55,27 @@ public abstract class GraphicForStreches implements IGraphicGenerator { @Override public XYModel getAccumulatedHoursChartData( IStretchesFunctionModel stretchesFunctionModel) { - List stretches = stretchesFunctionModel.getStretches(); + List stretches = stretchesFunctionModel.getStretchesPlusConsolidated(); if (stretches.isEmpty()) { return new SimpleXYModel(); - } else { - return getAccumulatedHoursChartData(stretches, - stretchesFunctionModel.getTaskStartDate(), new BigDecimal( - stretchesFunctionModel.getAllocationHours())); } + return getAccumulatedHoursChartData(stretches, + stretchesFunctionModel.getTaskStartDate(), new BigDecimal( + stretchesFunctionModel.getAllocationHours())); } @Override public XYModel getDedicationChart( IStretchesFunctionModel stretchesFunctionModel) { - List stretches = stretchesFunctionModel.getStretches(); + List stretches = stretchesFunctionModel + .getStretchesPlusConsolidated(); if (stretches.isEmpty()) { return new SimpleXYModel(); } - return getDedicationChart(stretches, stretchesFunctionModel - .getTaskStartDate(), new BigDecimal(stretchesFunctionModel - .getAllocationHours()), stretchesFunctionModel.getTaskCalendar()); + return getDedicationChart(stretches, + stretchesFunctionModel.getTaskStartDate(), + new BigDecimal(stretchesFunctionModel.getAllocationHours()), + stretchesFunctionModel.getTaskCalendar()); } protected abstract XYModel getDedicationChart(List stretches, @@ -161,8 +162,8 @@ public abstract class GraphicForStreches implements IGraphicGenerator { @Override public boolean areChartsEnabled(IStretchesFunctionModel model) { - return canComputeChartFrom(model.getAllStretches(), model - .getTaskStartDate()); + return canComputeChartFrom(model.getStretchesPlusConsolidated(), + model.getTaskStartDate()); } @Override