Chartjs-React-chartjs-2 chart.js: How to make strokewidth of dougnut chart thin?

0👍

You need to define the cutoutPercentage option inside the chart options as follows:

<Doughnut
    data={data}
    options={{
      responsive: true,
      cutoutPercentage: 80,
      ...
    }}
  />

cutoutPercentage: The percentage of the chart that is cut out of the middle (default value is 50).

3👍

Edit cutout property in options


let options = {
  responsive: true,
  cutout:"80%",
  legend: {
    display: false,
  },
  layout: {
    padding: 10,
  },
};

Leave a comment