import { Component , OnInit , Input } from '@angular/core' ; @ Component ( { selector : 'app-pie-chart' , templateUrl : './pie-chart.component.html' , styleUrls : [ './pie-chart.component.scss' ] } ) export class PieChartComponent implements OnInit { @ Input ( ) dataset : any ; @ Input ( ) labels : any ; public chartType = 'pie' ; public chartColors : Array < any > = [ { backgroundColor : [ '#F7464A' , '#46BFBD' , '#FDB45C' , '#949FB1' , '#4D5360' ] , hoverBackgroundColor : [ '#FF5A5E' , '#5AD3D1' , '#FFC870' , '#A8B3C5' , '#616774' ] , borderWidth : 2 , } ] ; public chartOptions : any = { responsive : true } ; ngOnInit ( ) { } }