[Chartjs]-How to Remove Unnecessary Spaces around a semi-Doughnut Chart.js Chart

1👍

You can use the padding property to “push” the doughnuts towards each other.

For left doughnut:

options: {
    legend: {
        display: false
    },
    circumference:1 * Math.PI,
    rotation: -1.5 * Math.PI,
    layout: {
        padding: {
            left: 150
        }
    }
}

For right doughnut:

options: {
    legend: {
        display: false
    },
    circumference:1 * Math.PI,
    rotation: -0.5 * Math.PI,
    layout: {
        padding: {
            right: 150
        }
    }
}

Result:

Highlighted canvas

JSFiddle

Leave a comment