Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to vary the thickness of doughnut chart, using ChartJs.?

How to vary the thickness of doughnut chart, using ChartJs

like image 924
shashisp Avatar asked Jan 09 '14 07:01

shashisp


People also ask

How do you change the thickness of a donut chart?

Click Series Options, and then under Doughnut Hole Size, drag the slider to the size that you want, or type a percentage value between 10 and 90 in the Percentage box.

How do I edit a donut chart in Powerpoint?

Go to Insert -> Chart and then choose Doughnut from the list. Now you can customize the chart by adding data in the spreadsheet. If you need to add a new data series with a concentric circle in the chart, you can add a new column to the sample data in the spreadsheet.


1 Answers

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

var options = {             cutoutPercentage: 40 }; 

more details here http://www.chartjs.org/docs/#doughnut-pie-chart-chart-options

Update: Since version 3

var options = {             cutout: 40 }; 

According to the documentation at release notes of 3.x

Doughnut cutoutPercentage was renamed to cutout and accepts pixels as numer and percent as string ending with %.

like image 77
tetchen9 Avatar answered Sep 22 '22 21:09

tetchen9