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

Cut too long labels

parent 28f946bf
No related merge requests found
...@@ -55,7 +55,11 @@ export class StatisticComponent implements OnInit { ...@@ -55,7 +55,11 @@ export class StatisticComponent implements OnInit {
this.subject = content.subject; this.subject = content.subject;
const length = content.options.length; const length = content.options.length;
for (let i = 0; i < length; i++) { 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.contentService.getAnswer(content.id).subscribe(answer => {
this.data = answer.roundStatistics[0].independentCounts; this.data = answer.roundStatistics[0].independentCounts;
......
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