From 55463d0108332ef5bd61688870d596ba17871361 Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Fri, 28 May 2021 20:57:10 +0200 Subject: [PATCH] Add an end screen for participants --- .../poll-participants/poll-participants.component.html | 10 +++++++++- .../poll-participants/poll-participants.component.ts | 2 ++ src/app/pages/presentation/presentation.component.html | 4 ++++ src/app/pages/presentation/presentation.component.ts | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/app/pages/poll-participants/poll-participants.component.html b/src/app/pages/poll-participants/poll-participants.component.html index 3cdb3cdd..3cd4cec4 100644 --- a/src/app/pages/poll-participants/poll-participants.component.html +++ b/src/app/pages/poll-participants/poll-participants.component.html @@ -53,12 +53,20 @@

{{activeItem?.question}}

+ + + + {{activeItem?.question}} class="chart" [view]="[700, 400]" [results]="chartData" legend="true" + doughnut="true" + arcWidth="0.35" scheme="forest"> diff --git a/src/app/pages/presentation/presentation.component.ts b/src/app/pages/presentation/presentation.component.ts index 1b3bdeaf..02863f85 100644 --- a/src/app/pages/presentation/presentation.component.ts +++ b/src/app/pages/presentation/presentation.component.ts @@ -56,7 +56,6 @@ export class PresentationComponent implements OnInit { // Connect to WebSocket const subscription = this.websocketService.establishConnectionPresentation(this.pollId); subscription.subscribe(pollItem => { - console.log('PollItem' + JSON.stringify(pollItem)); if (Object.keys(pollItem).length > 1) { // Update UI this.activeItem = pollItem; @@ -81,6 +80,7 @@ export class PresentationComponent implements OnInit { } else { this.activeItem = pollItem; this.poll.currentItem = pollItem.itemId; + this.chartData = this.getChartData(); } }); }