How to vary the thickness of doughnut chart, using ChartJs
Advertisement
Answer
since version 2 the field has been renamed to cutoutPercentage.
cutoutPercentage
Number 50 – for doughnut, 0 – for pie
The percentage of the chart that is cut out of the middle.
It can be used like this
JavaScript
x
4
1
var options = {
2
cutoutPercentage: 40
3
};
4
more details here http://www.chartjs.org/docs/#doughnut-pie-chart-chart-options
Update: Since version 3
JavaScript
1
4
1
var options = {
2
cutout: 40
3
};
4
According to the documentation at release notes of 3.x
Doughnut
cutoutPercentage
was renamed tocutout
and accepts pixels as numer and percent as string ending with%
.