Closed Cailrorn closed 8 years ago
use the scaleLabel - fontSize setting http://www.chartjs.org/docs/#scales
options: { scales: { scaleLabel: { fontSize: 16 } } }
I have try, but doesn't work
var options = { scale: { ticks: { beginAtZero: true, display: false }, scaleLabel: { fontSize:30 } }, legend: false, responsive: true, tooltips: false }
try pointLabelFontSize: 20
?
See the point label section in http://www.chartjs.org/docs/#scales-radial-linear-scale
So there is an error in the documentation , it is the sub option pointLabels and not pointLabel
And lineArc is not necessarily false
Point Label Options
The following options are used to configure the point labels that are shown on the perimeter of the scale. They can be found in the pointLabel sub options. Note that these options only apply if lineArc is false.
var e = { scale: { ticks: { beginAtZero: !0, display: !1 }, pointLabels: { fontSize:12 } }, legend: !1, responsive: !0, tooltips: !1 }, o = { labels: ["Analyse", "Programmation", "Communication", "Planification", "Pilotage", "Suivi", "Animation"], datasets: [{ backgroundColor: "rgba(220,220,220,0.2)", borderColor: "#585858", fontSize: 30, defaultFontSize: 30, pointBackgroundColor: "#343434", pointBorderColor: "#fff", pointHoverBackgroundColor: "#fff", pointHoverBorderColor: "#dcdcdc", borderWidth: 2, data: [3, 3, 2, 2, 1.5, 2.5, 1.5] }] }; new Chart($("#radar"), { type: "radar", data: o, options: e })
This work, not with "pointLabel"
The following let me change the radial chart axis label font sizes with Chart.js v2.6.0:
options: {
scale: {
pointLabels: {
fontSize: 20,
},
}
It doesn't work in radar chart(
@weijiekoh's solution worked for me on radar chart
My options:
options: {
elements:{
line:{
tension:0,
borderWidth:3
}
},
responsive: true,
legend: {
position: 'bottom',
labels: {
fontSize: 20,
}
},
title: {
display: false,
text: 'Rede'
},
gridLines: {
display: false
},
scale: {
ticks: {
display: false,
beginAtZero: true
},
pointLabels: { fontSize: 20 } ,
reverse: false
},
animation: {
animateRotate: false,
animateScale: true
}
}
This solution does not work on 3.11.2
@kungla the above configuration was for CHARTJS v2.
I have tried to change it for version 3 (I didn't test it):
options: {
responsive: true,
plugins: {
legend: {
position: 'bottom',
labels: {
font: {
size: 20
}
}
},
title: {
display: false
}
}
scales: {
r: {
beginAtZero: true,
grid: {
display: false
},
ticks: {
display: false,
},
pointLabels: {
font: {
size: 20
}
}
}
}
}
this works. Many thanks.
Hi,
How can I change the size of labels ?
Thx !