diff --git a/src/app/components/shared/statistic/statistic.component.html b/src/app/components/shared/statistic/statistic.component.html index bdd22dab8db754499f6582cb853654ac60e008da..3c1111d6b17543fec0a9a2e1b21a0afedf33e18a 100644 --- a/src/app/components/shared/statistic/statistic.component.html +++ b/src/app/components/shared/statistic/statistic.component.html @@ -11,7 +11,7 @@ </div> </div> <mat-list role="list"> - <mat-list-item role="listitem" *ngFor="let a of answerList">{{a.label}}: {{a.answer}}</mat-list-item> + <mat-list-item role="listitem" *ngFor="let a of answerList">{{a.label}} : {{a.answer}}</mat-list-item> </mat-list> </mat-card> </div> diff --git a/src/app/components/shared/statistic/statistic.component.ts b/src/app/components/shared/statistic/statistic.component.ts index 7cb05fcf5d7773d4f18c773f88017253c82152c7..109d97948c3922e7d0ff94eb60a96714db511106 100644 --- a/src/app/components/shared/statistic/statistic.component.ts +++ b/src/app/components/shared/statistic/statistic.component.ts @@ -56,11 +56,10 @@ export class StatisticComponent implements OnInit { this.answerList[i] = new AnswerList(null, null); this.labels[i] = this.label.charAt(i); this.answerList[i].label = this.labels[i]; - this.answerList[i].answer = content.options[i].label; if (content.options[i].label.length > 20) { - this.answers[i] = content.options[i].label.substr(0, 20) + '..'; + this.answerList[i].answer = content.options[i].label.substr(0, 30) + '..'; } else { - this.answers[i] = content.options[i].label; + this.answerList[i].answer = content.options[i].label; } } this.contentService.getAnswer(content.id).subscribe(answer => {