Browse Source

feat(lib): make proportionChartClicked an output signal

pull/6491/head
KenTandrian 4 weeks ago
parent
commit
8f1488f55f
  1. 7
      libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

7
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

@ -13,11 +13,10 @@ import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
ElementRef, ElementRef,
EventEmitter,
Input, Input,
OnChanges, OnChanges,
OnDestroy, OnDestroy,
Output, output,
viewChild viewChild
} from '@angular/core'; } from '@angular/core';
import { DataSource } from '@prisma/client'; import { DataSource } from '@prisma/client';
@ -81,11 +80,11 @@ export class GfPortfolioProportionChartComponent
@Input() maxItems?: number; @Input() maxItems?: number;
@Input() showLabels = false; @Input() showLabels = false;
@Output() proportionChartClicked = new EventEmitter<AssetProfileIdentifier>();
public chart: Chart<'doughnut'>; public chart: Chart<'doughnut'>;
public isLoading = true; public isLoading = true;
protected readonly proportionChartClicked = output<AssetProfileIdentifier>();
private readonly chartCanvas = private readonly chartCanvas =
viewChild.required<ElementRef<HTMLCanvasElement>>('chartCanvas'); viewChild.required<ElementRef<HTMLCanvasElement>>('chartCanvas');
private readonly OTHER_KEY = 'OTHER'; private readonly OTHER_KEY = 'OTHER';

Loading…
Cancel
Save