I need to change the color of the labels displayed at each point on the chart, I have tried many different things without any result at all.
Image
Code
const CHART = document.getElementById("radar_chart");
Chart.defaults.scale.ticks.beginAtZero = true;
Chart.defaults.scale.ticks.max = 10;
Chart.defaults.scale.ticks.display = false;
Chart.defaults.scale.ticks.display = false;
var radar = new Chart(CHART, {
type: 'radar',
data: {
labels: ["Team", "Potential", "Risk", "Social", "Hype"],
datasets: [
{
backgroundColor: "#2e4259cc",
borderColor: "#fff",
borderWidth: 3,
pointBorderColor: "#fff",
pointBackgroundColor: "#2e4259",
pointHoverRadius: 5,
data: [3, 5, 9, 5, 8]
}
]
},
options: {
legend: {
display: false,
fontColor: "#fff",
labels: {
fontColor: '#fff'
}
}
}
});
My latest effort was changing pointLabelFontColor but with no luck, i can't seem to find anything about it
options:{
scale:{
pointLabels:{
fontColor:"red",
},
}
In theory this should be the configuration you should use if we follow the doc for the Linear Radial Axis
The doc is for the version 2.7.2, so I am not sure it would work for your version, or if it would be any different in older version.
options: {
scales: {
r: {
pointLabels:{
color: 'rgb(54, 162, 235)',
},
},
}
I don’t know what version you are using, but the current configuration works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With