Skip to content
Snippets Groups Projects
Commit 1cce1def authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Add abstentions-bar to chart

parent b325d0a8
1 merge request!138Resolve "Refine answer statistics"
......@@ -65,8 +65,11 @@ export class StatisticComponent implements OnInit {
this.answerList[i].answer = content.options[i].label;
}
}
this.labels.push('Abstentions');
this.contentService.getAnswer(content.id).subscribe(answer => {
this.data = answer.roundStatistics[0].independentCounts;
this.data.push(answer.roundStatistics[0].abstentionCount);
console.log(this.data);
this.chart = new Chart('chart', {
type: 'bar',
data: {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment