<template>
<div>
<div id="chart">
<apexchart
type="gauge"
height="300"
:options="chartOptions"
:series="series"
></apexchart>
</div>
</div>
</template>
<script>
import VueApexCharts from 'vue-apexcharts'
export default {
components: {
apexchart: VueApexCharts,
},
data: function () {
return {
series: [83],
chartOptions: {
chart: {
height: 300,
type: 'gauge',
},
plotOptions: {
radialBar: {
startAngle: -90,
endAngle: 90,
track: {
background: '#e7e7e7',
strokeWidth: '97%',
margin: 5,
},
dataLabels: {
name: { show: false },
value: {
offsetY: -2,
fontSize: '32px',
formatter: function (val) {
return val + '%'
},
},
},
},
},
fill: {
type: 'gradient',
gradient: {
shade: 'light',
shadeIntensity: 0.4,
inverseColors: false,
opacityFrom: 1,
opacityTo: 1,
stops: [0, 50, 53, 91],
},
},
labels: ['Score'],
},
}
},
}
</script>
<style>
#chart {
padding: 0;
max-width: 380px;
margin: 35px auto;
}
</style>