Angular 14, ChartJS: 4.1.1, NG2-Charts: 4.1.1. I am facing some trouble when trying to customize doughnut chart colors. Here I tried setting colors individually for each datasets, but its not working as expected. And without setting any colors, it working fine with default colors.
this.doughnutChartData = {
labels: this.doughnutChartLabels = [ 'Label1', 'Label2', 'Label3','Label4' ],
datasets: [
{ data: this. doughnutChartAircraftDatasets,backgroundColor: [
'#fc5858'
] },
{ data: this.doughnutChartChartBagDatasets, backgroundColor: [
'#19d863'
]},
{ data: this.doughnutChartChartFlightDatasets, backgroundColor: [
'#fdf57d'
]},
{ data: this.doughnutChartChartPassengerDatasets, backgroundColor: [
'#fdbb7d'
]}
]
};
Any help on this appreciated ! Thanks in advance.