0👍
✅
Based on your code I think you need to define array not string for your variables. Example:
var sDate = [];
var ooSum = [];
var bgC = [];
for (var i = 0; i < adata.length; i++) {
sDate.push(adata[i].startDate);
ooSum.push(adata[i].oSum);
bgC.push(adata[i].bgcolor);
}
then replace
data: {
labels: sDate,
datasets: [
{
label: 'Start Date',
backgroundColor: bgC,
data: ooSum
}
]
},
Source:stackexchange.com