0👍
Hello, use [colors]=”chartColors” in canvas
home.html
<div style="display: block;">
<canvas baseChart [data]='donutChartData' height="350" [labels]='donutChartLabels' [colors]="chartColors" [chartType]='donutChartType'>
</canvas>
in home.ts create variable;
public chartColors: any[] = [
{
backgroundColor:["#FF7360", "#6FC8CE", "#8dd35f", "#2a80f7"]
}];
- Chartjs-Chart.js after ajax refresh there are two charts in the same container (new and old)
- Chartjs-Why the bar are not aligned the y axis
Source:stackexchange.com