<template>
<div>
<div id="chart">
<apexchart
type="donut"
height="380"
:options="chartOptions"
:series="series"
></apexchart>
</div>
</div>
</template>
<script>
import VueApexCharts from 'vue-apexcharts'
export default {
components: {
apexchart: VueApexCharts,
},
data: function () {
return {
series: [44, 55, 41, 17, 15],
chartOptions: {
chart: {
type: 'donut',
height: 380,
},
labels: ['Comedy', 'Action', 'SciFi', 'Drama', 'Horror'],
colors: ['#6366F1', '#0EA5E9', '#22C55E', '#F59E0B', '#EF4444'],
plotOptions: {
pie: {
borderRadius: 8,
spacing: 3,
donut: {
size: '62%',
},
},
},
stroke: {
width: 0,
},
legend: {
position: 'bottom',
},
title: {
text: 'Rounded, spaced donut slices',
align: 'left',
},
},
}
},
}
</script>
<style>
#chart {
max-width: 380px;
margin: 35px auto;
}
</style>