import { Component, Input, OnInit } from '@angular/core';
import { ChartOptions, ChartType } from 'chart.js';

@Component({
    selector: 'app-doughnutchart',
    templateUrl: './doughnutchart.component.html',
    styleUrls: ['./doughnutchart.component.scss']
})
export class DoughnutchartComponent implements OnInit {

    @Input() chartData: any;
    @Input() chartLabels: string[] = [];
    @Input() chartOptions: ChartOptions = {};
    @Input() chartTitle: string;
    @Input() plugins;
    @Input() isLoading: boolean;
    @Input() totalChartData: number;
    @Input() noDataMessage: string;

    chartType: ChartType = 'doughnut';


    constructor() {}

    ngOnInit(): void {

    }

    isNaN(value: any): boolean {
      return isNaN(value);
    }

}