Skip to content

Commit

Permalink
DELPHI-1816 [ESURVEY-8497] Self-assessment - COMPUTATION issues
Browse files Browse the repository at this point in the history
  • Loading branch information
clam2310 committed Nov 6, 2024
1 parent 55ba457 commit 1e35043
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,11 @@ public SAResult getSAResult(int datasetid, String contributionuid) {

double avg = counter != 0 ? value / (double)counter : 0.0;

//Output data = AVERAGE (variables) – Mrat + 5
result.getValues().add(Math.round(10.0 * (avg - mrat + coefficient)) / 10.0);
//Output data = AVERAGE (variables) – Mrat + 5
double computedValue = Math.round(10.0 * (avg - mrat + coefficient)) / 10.0;
result.getValues().add(computedValue);
int typeIndex = types.indexOf(result.getCriteria().get(i).getType());
result.getValuesForTypes().get(typeIndex).add(value);
result.getValuesForTypes().get(typeIndex).add(computedValue);
}

return result;
Expand Down
29 changes: 19 additions & 10 deletions src/main/webapp/WEB-INF/views/runner/saResultInner.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,6 @@
data: data,
options: {
responsive: true,
scales: {
yAxes: [{ticks: {beginAtZero: true, autoSkip: false}}],
xAxes: [{ticks: {beginAtZero: true, autoSkip: false}}]
},
<c:if test="${!SAReportConfiguration.legend}">
legend: {
Expand All @@ -405,11 +400,25 @@
</c:if>
<c:if test="${!SAReportConfiguration.scale}">
scale: {
ticks: {
display: false
},
},
<c:if test='${SAReportConfiguration.selectedChart == "SPIDER"}'>
scale: {
ticks: {
display: false
},
},
</c:if>
<c:if test='${SAReportConfiguration.selectedChart != "SPIDER"}'>
scales: {
yAxes: [{
ticks: {
display: false
}
}]
},
</c:if>
</c:if>
title: {
Expand Down

0 comments on commit 1e35043

Please sign in to comment.