diff --git a/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java b/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java index 5f49cbc..2ff320e 100644 --- a/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java +++ b/backend/src/main/java/uk/co/neviyn/Observations/api/AverageStatsChartJs.java @@ -4,27 +4,29 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.List; import lombok.AllArgsConstructor; +import lombok.Data; import lombok.NonNull; /** * AverageStats in a format easily readable by Chart.js */ +@Data public class AverageStatsChartJs { @NonNull @JsonProperty - private List labels = new ArrayList(); + private List labels = new ArrayList<>(); @NonNull @JsonProperty - List datasets = new ArrayList(); + private List datasets = new ArrayList<>(); public AverageStatsChartJs(List inputData){ - List monitoring = new ArrayList(), - control = new ArrayList(), - conservatism = new ArrayList(), - teamwork = new ArrayList(), - knowledge = new ArrayList(); + List monitoring = new ArrayList<>(), + control = new ArrayList<>(), + conservatism = new ArrayList<>(), + teamwork = new ArrayList<>(), + knowledge = new ArrayList<>(); for(AverageStats averageStats: inputData){ labels.add(averageStats.getDate().toString()); monitoring.add(averageStats.getMonitoring());