home.component.ts
global: boolean = false;
country!: string;
data: GlobalData;
dailyData: any[] = [];
countries: any[] = [];
lineChartData: any[] = [
{
data: [65, 64, 33, 44],
label: 'Temp label'
}
];
lineChartType = "line";
lineChartLabels: any[] = [
'label01', 'label02', 'label03'
];
barChartData: any[] = [
{
data: [65, 76, 33],
label: 'Label'
}
];
home.component.html
<canvas baseChart
[chartType] = "lineChartType"
[datasets] = "lineChartData"
[labels] = "lineChartLabels"
>
</canvas>
Error:
Type 'string' is not assignable to type 'keyof ChartTypeRegistry'
Error-line:
[chartType] = "lineChartType"
The error occurred in home.component.html
I need a solution. Try to find out the solution on google but I couldn't find it.