most of the ways were too complex for me so here's how is solved it:
I am using react btw, so in the data parameter i was doing this
Before:
datasets:[
{
label: 'Maximum Predicted Temperature',
fill: false,
lineTension: 0.5,
backgroundColor: ['red'],
borderColor: 'rgba(0,0,0,1)',
borderWidth: 2,
data: max
},
After:
datasets:[
{
label: 'Maximum Predicted Temperature',
fill: false,
lineTension: 0.5,
backgroundColor: ['red','blue','green','yellow','orange','purple','pink','brown','grey','black','white','violet'],
borderColor: ['red','blue','green','yellow','orange','purple','pink','brown','grey','black','white','violet'],
borderWidth: 2,
data: max
}
the color will loop if your given data points are more than the number of colors provided and the color red will apply on every 12th data point it really helped me thought the solution is bit clumsy but gives more control hope this helps