0👍
cutout
is a property of a dataset
. It can be set per dataset…
{
type: 'doughnut',
data: {
datasets: [{
cutout:'40%'
...
},
{
cutout:'90%'
...
}]
}
}
…or (as you seem to want to do) for all datasets in the chart:
{
type: 'doughnut',
data: data,
options: {
datasets: {
doughnut: {
cutout:'90%'
}
}
}
}
- Chartjs-ChartJS for 1 and 0 values display true or false
- Chartjs-Iterating through the same dataset in Chart.js
-1👍
Try this
chartOptions: ChartOptions<'doughnut'> = {
scales: {
x: {
display: false,
},
y: {
display: false
}
},
plugins: {
legend: {
display: false
},
tooltip: {
enabled: false
}
},
cutout: '94%',
responsive: false,
maintainAspectRatio: false
};
- Chartjs-OffsetWidth / offsetHeight is zero when template loaded by ngRoute
- Chartjs-Why do literal arrays work, but not coded arrays?
Source:stackexchange.com