Fixed variable declaration.
This commit is contained in:
parent
85cbc4d062
commit
411f6ca38c
@ -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<String> labels = new ArrayList<String>();
|
||||
private List<String> labels = new ArrayList<>();
|
||||
|
||||
@NonNull
|
||||
@JsonProperty
|
||||
List<Dataset> datasets = new ArrayList<Dataset>();
|
||||
private List<Dataset> datasets = new ArrayList<>();
|
||||
|
||||
public AverageStatsChartJs(List<AverageStats> inputData){
|
||||
List<Float> monitoring = new ArrayList<Float>(),
|
||||
control = new ArrayList<Float>(),
|
||||
conservatism = new ArrayList<Float>(),
|
||||
teamwork = new ArrayList<Float>(),
|
||||
knowledge = new ArrayList<Float>();
|
||||
List<Float> 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());
|
||||
|
Loading…
Reference in New Issue
Block a user