i use vue-chart-3 in nuxt and want show percentage value in pie pieces but i don't know how? pieceLabel doesn't work!
<template>
<div style="width: 100%">
<DoughnutChart :chart-data="testData" :options="options" />
</div>
</template>
<script>
import { defineComponent, ref } from '@vue/composition-api'
import { DoughnutChart } from 'vue-chart-3'
export default defineComponent({
name: 'Home',
components: { DoughnutChart },
setup () {
const testData = {
labels: ['Paris', 'Nîmes', 'Toulon', 'Perpignan', 'Autre'],
datasets: [
{
data: [30, 40, 60, 70, 5],
backgroundColor: ['red', '#0079AF', '#123E6B', '#97B0C4', '#A5C8ED']
}
]
}
const options = ref({
responsive: true,
pieceLabel: {
mode: 'percentage',
precision: 1
}
})
return { testData, options }
}
})
</script>
should i use chartjs-plugin-datalabels or something else? thanks in advance.