[FIX] survey: correctly fade out wrong answer bars in session mode

This commit fixes the faded out answers bars on choice questions during a
survey session.
The logic is currently inverted (correct answers are faded out instead of wrong
ones).

LINKS

PR #48442
Task 2208574
This commit is contained in:
Aurélien Warnon
2020-03-27 14:52:32 +00:00
parent 732ccd1715
commit 721c34ccc9
@@ -199,8 +199,8 @@ publicWidget.registry.SurveySessionChart = publicWidget.Widget.extend({
_getBackgroundColor: function (metaData) {
var opacity = '0.8';
if (this.showAnswers && this.hasCorrectAnswers) {
if (this._isValidAnswer(metaData.dataIndex)){
opacity = 0.3;
if (!this._isValidAnswer(metaData.dataIndex)){
opacity = '0.3';
}
}
var rgb = SESSION_CHART_COLORS[metaData.dataIndex];