diff --git a/src/app/components/shared/statistic/statistic.component.ts b/src/app/components/shared/statistic/statistic.component.ts index b57b53f788e121307e1dcbfe45e93c2196fb7801..050ffb0670f7a831e9e4645b41f3ea842bff051d 100644 --- a/src/app/components/shared/statistic/statistic.component.ts +++ b/src/app/components/shared/statistic/statistic.component.ts @@ -55,7 +55,11 @@ export class StatisticComponent implements OnInit { this.subject = content.subject; const length = content.options.length; for (let i = 0; i < length; i++) { - this.labels[i] = content.options[i].label; + if (content.options[i].label.length > 20) { + this.labels[i] = content.options[i].label.substr(0, 20) + '..'; + } else { + this.labels[i] = content.options[i].label; + } } this.contentService.getAnswer(content.id).subscribe(answer => { this.data = answer.roundStatistics[0].independentCounts;