pie chart for angular 10 code example
Example: pie chart typescript code in angular
import {Component} from '@angular/core';
@Component({
templateUrl: './piechart.html'
})
export class PieChart {
data: any;
constructor() {
this.data = {
labels: ['Jan','Feb','March'],
datasets: [
{
data: [305, 51, 111],
hoverBackgroundColor: [
"#FF6371",
"#36A2EB",
"#FFCE45"
],
backgroundColor: [
"#FF6371",
"#36A2EB",
"#FFCE45"
]
}]
};
}
}