Merge pull request #5284 from tsiegleauq/clickable-motion-charts

Remove tooltips for charts
This commit is contained in:
Emanuel Schütze 2020-03-26 17:19:19 +01:00 committed by GitHub
commit aaea4ec2e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -90,6 +90,9 @@ export class ChartsComponent extends BaseViewComponent {
if (this.isCircle) {
return {
aspectRatio: 1,
tooltips: {
enabled: false
},
legend: {
position: 'left'
}
@ -97,6 +100,9 @@ export class ChartsComponent extends BaseViewComponent {
} else {
return {
aspectRatio: 3,
tooltips: {
enabled: false
},
scales: {
xAxes: [
{

View File

@ -60,6 +60,8 @@
<div *ngIf="poll.stateHasVotes">
<div *osPerms="'assignments.can_manage'; or: poll.isPublished">
<os-charts
class="pointer"
routerLink="/assignments/polls/{{ poll.id }}"
[labels]="candidatesLabels"
[data]="chartDataSubject | async"
[hasPadding]="false"

View File

@ -86,7 +86,7 @@
</os-icon-container>
</div>
</div>
<div class="doughnut-chart">
<div class="doughnut-chart" [routerLink]="pollLink">
<os-charts *ngIf="showChart" type="doughnut" [data]="chartDataSubject | async" [hasPadding]="false">
</os-charts>
</div>