Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikBuetler committed Sep 2, 2024
1 parent c5118c0 commit cd87fa9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions libraries/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function updatePlots(){
$p['plotData'] = $plot->process($groupedJobs, $p);
$temp = json_decode($p['plotData'], true);
foreach ($temp['datasets'] as $dataset) {
# Check if data for this parameter is present
# Check if data for this parameter is present, if not - skip it
if(count($dataset['data'])>0) {
# Check and apply the selected aggregation function
if(isset($p['aggregate'])) {
Expand All @@ -314,19 +314,13 @@ function updatePlots(){
}
# No aggregation selected
else {
# TODO we now pass an array instead of a single value, edit processing etc to check if they received an array and handle accordingly
# TODO we would like to pass an array instead of a single value to allow for no aggregation
#$tempData['dataForEval'][] = $dataset['data'];
$tempData['dataForEval'][] = array_sum($dataset['data']);
}
$tempLabels['labelsForEval'][] = $evaluation->getName();
}
# No data for this parameter is present
#else {
# $tempData['dataForEval'][] = 0;
#}
}
#$tempLabels['labelsForEval'][] = $evaluation->getName();

}
$temp['datasets'][0]['data'] = $tempData['dataForEval'];
$temp['labels'] = $tempLabels['labelsForEval'];
Expand Down

0 comments on commit cd87fa9

Please sign in to comment.