[Vuejs]-Chart.js Doughnut with rounded with Vue3 and vue-chart-3

0๐Ÿ‘

/* In parents */
// template
        <DoughnutChart class="simulator__doughnut" :chartData="datacollection"/>
// computed
    datacollection() {
        return {
            datasets: [
                {
                    data: [this.monthlyPayment, this.monthlyRate],
                    backgroundColor: ["#ff0058", "#ff645a"],
                    borderWidth: 0,
                    angle: [50],
                    borderRadius: [{ innerEnd: 50, outerEnd: 50, innerStart: 50, outerStart: 50}],
                    spacing: -50
                },
            ],
        };
    }, 

Leave a comment