Handle multiple responses in chart
This commit is contained in:
parent
41df85c33b
commit
6da4e0b9b4
@ -20,7 +20,10 @@
|
|||||||
req_responses = question.getResponses();
|
req_responses = question.getResponses();
|
||||||
req_responses.then((responses) => {
|
req_responses.then((responses) => {
|
||||||
for (const res of responses) {
|
for (const res of responses) {
|
||||||
data.datasets[0].values[proposal_idx[res.value]] += 1;
|
const rsplt = res.value.split(',');
|
||||||
|
for (const r of rsplt) {
|
||||||
|
data.datasets[0].values[proposal_idx[r]] += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user