I want to change de color of the bar columns on my chart when the xaxis value is a weekend day.
Here is a sample of my data:
[
[
1564034400000,
291681
],
[
1564120800000,
1533580
],
[
1564207200000,
985398
],
[
1564293600000,
451679
],
[
1564380000000,
1051938459
],
[
1564466400000,
1486601
],
[
1564552800000,
1712150
],
[
1564639200000,
1719820
],
[
1564725600000,
2142532
],
[
1564812000000,
1332015
]
]
i've tried this ():
data.forEach(x => {
ndata.push([x.date, x.eApar]);
if(x.date.getDay()==0 || x.date.getDay()==6){
bcolor="orange"
}
else
{
bcolor="";
}
});
and then on the chart building i have this:
plotOptions: {
series: {
color: bcolor
},
series: [{
data: ndata,
type: 'column',
}],
But it change the color of all the columns.
I hope you can help me, thanks!