Chartjs-How to dynamically pass chart data to shared chart component in angular 10 with chartJS

0👍

solved the problem with *ngIf

<ng-container *ngIf="dataSets[0].data.length > 0 && labels.length > 0">
  <app-chart
    [type]="chartType.Line"
    [dataSets]="dataSets"
    [labels]="labels"
    [options]="options"
  ></app-chart>
</ng-container>

stackblitz

Leave a comment