[Chartjs]-How to set chart's percentageInnerCutout property with ng2-charts

2👍

  • Html

    <canvas baseChart style="height: 100%; width:100%;    position: grid;
    bottom: 40px;"
      [datasets]="doughnutChartData"
          [labels]="doughnutChartLabels"
          [chartType]="doughnutChartType"
          [options]="doughnutChartOptions"
          [colors]="doughnutChartColors"></canvas>
    
  • ts

    doughnutChartOptions:any = {
    cutoutPercentage: 55,
    responsive: true,
    legend: {
    display: true,
    position: ‘bottom’,
    fullWidth: false,
    labels:{
    padding: 15,
    fontSize: 10,
    usePointStyle: true,
    fontColor: ‘rgb(143, 142, 142)’,
    boxWidth: 10,
    }
    },
    }

Leave a comment