<template>
<div>
<div id="chart">
<apexchart
type="radar"
height="350"
:options="chartOptions"
:series="series"
></apexchart>
</div>
</div>
</template>
<script>
import VueApexCharts from 'vue-apexcharts'
export default {
components: {
apexchart: VueApexCharts,
},
data: function () {
return {
series: [
{
name: 'Activity Score',
data: [20, 100, 40, 30, 50, 80, 33],
},
],
chartOptions: {
chart: {
height: 350,
type: 'radar',
},
dataLabels: {
enabled: true,
},
plotOptions: {
radar: {
size: 140,
polygons: {
strokeColors: '#e9e9e9',
fill: {
colors: ['#f8f8f8', '#fff'],
},
},
},
},
title: {
text: 'Weekly Activity',
},
colors: ['#FF4560'],
markers: {
size: 4,
colors: ['#fff'],
strokeColor: '#FF4560',
strokeWidth: 2,
},
tooltip: {
y: {
formatter: function (val) {
return val
},
},
},
xaxis: {
categories: [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
],
},
yaxis: {
labels: {
formatter: function (val, i) {
if (i % 2 === 0) {
return val
} else {
return ''
}
},
},
},
},
}
},
}
</script>
<style>
#chart {
max-width: 450px;
margin: 35px auto;
}
</style>