[Chartjs]-How to set cutout on doughnut chart using ng2-charts?

3👍

You need to specify to the ChartOptions that its for the doughnut specific, if you do that it works fine:

public DonutChartOptions: ChartOptions<'doughnut'> = {
  options: {
    cutout: "70%"
  }
};

TS playground link

0👍

This is working for me on ng2-charts (v.3.1.2) and chart.js (v.3.9.1). Hope it will help you too.

public doughnutChartOptions: ChartConfiguration<'doughnut'>['options'] = {
 cutout: '80%'
};

Leave a comment