What code link are you using?
The one with the script. @Manu.n 's code
Can I have your current script for that chart?
{
type: 'pie',
data: {
datasets: [
{
data: [InsertData],
backgroundColor: [
'#D64959',
'#F2BD7B',
'#F7907D',
],
borderColor:'black',
borderWidth: 0.5,
},
],
labels: ['ืคืืืืื','ืืืืื','ืฉืืื']
},
options: {
legend: {
labels: {
fontColor: "white",
fontSize: 12
}
},
plugins: {
datalabels: {
color: "black",
}
}
}
}
Please try this.
{
type: 'pie',
data: {
datasets: [
{
data: [InsertData],
backgroundColor: [
'#D64959',
'#F2BD7B',
'#F7907D',
],
borderColor:'black',
borderWidth: 0.5,
},
],
labels: ['ืคืืืืื','ืืืืื','ืฉืืื']
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: {
labels: {
fontColor: "white",
fontSize: 12
}
},
plugins: {
datalabels: {
color: "black",
}
}
}
}
3 Likes
Yes.
added:
responsive: true,
maintainAspectRatio: false,
It works now!
2 Likes
Brilliant
1 Like
Eventually I will learn JS here just from you guys
2 Likes