<template>
<div>
<div id="chart">
<apexchart
type="radialBar"
height="390"
:options="chartOptions"
:series="series"
></apexchart>
</div>
</div>
</template>
<script>
import VueApexCharts from 'vue-apexcharts'
export default {
components: {
apexchart: VueApexCharts,
},
data: function () {
return {
series: [76, 67, 61, 90],
chartOptions: {
chart: {
height: 390,
type: 'radialBar',
},
plotOptions: {
radialBar: {
offsetY: 0,
startAngle: 0,
endAngle: 270,
hollow: {
margin: 5,
size: '30%',
background: 'transparent',
image: undefined,
},
dataLabels: {
name: {
show: false,
},
value: {
show: false,
},
},
barLabels: {
enabled: true,
useSeriesColors: true,
offsetX: -8,
fontSize: '16px',
formatter: function (seriesName, opts) {
return (
seriesName +
': ' +
opts.w.globals.series[opts.seriesIndex] +
'%'
)
},
},
},
},
colors: ['#1ab7ea', '#0084ff', '#39539E', '#0077B5'],
labels: ['Email', 'Push', 'In-App', 'SMS'],
responsive: [
{
breakpoint: 480,
options: {
legend: {
show: false,
},
},
},
],
},
}
},
}
</script>
<style>
#chart {
padding: 0;
max-width: 650px;
margin: 35px auto;
}
.apexcharts-legend text {
font-weight: 900;
}
</style>