I have a bar chart where on the x axis we have dates. I want to make the weekend days bold or give it a different colors.
window.myBar = new Chart(ctx, {
type: 'bar',
data: barChartData,
options: {
title: {
display: false,
},
tooltips: {
mode: 'index',
intersect: false
},
legend: {
display: true,
position: "top"
},
responsive: true,
maintainAspectRatio: false,
scales: {
xAxes: [{
stacked: true,
ticks: {
fontColor:'#CCCCCC',
callback: function(value, index, values) {
if (value.substring(0, 3) == 'Sat' || value.substring(0, 3) == 'Sun') {
return value.toUpperCase();
} else {
return value;
}
},
}
}],
yAxes: [{
stacked: true,
}]
}
}
});
I also looked into the minor ticks and major ticks configuration, but not sure if that's what i have to look into and how to implement that.
