1👍
✅
The problem is that you defined backgroundColor
and borderColor
as array
. In such case, Chart.js expects a color definition for each data value.
backgroundColor: ['rgba(0, 65, 139, 0.5)'],
borderColor: ['rgba(0, 65, 139, 1)'],
Simply define the colors as string
and it will work.
backgroundColor: 'rgba(0, 65, 139, 0.5)',
borderColor: 'rgba(0, 65, 139, 1)',
Source:stackexchange.com