I am trying to draw a line chart with individual colors per data entry. Using borderColor as an array of colors should have achieved desired behaviour but doesn't seem to work.
Did anyone else encounter this problem? Are there any easy workarounds?
Code used:
public lineChartData: ChartDataSets[] = [
{ data: [65, 59, 80, 81], label: 'Series A' },
];
public lineChartLabels: Label[] = ['January', 'February', 'March', 'April'];
public lineChartOptions: (ChartOptions & { annotation: any }) = {
responsive: true,
};
public lineChartColors: Color[] = [
{
borderColor: ['red', 'red', 'blue', 'blue'],
backgroundColor: 'rgba(0, 0, 0, 0)',
},
];
public lineChartLegend = true;
public lineChartType = 'line';
Output: Broken chart