import React from 'react'
import ReactApexChart from 'react-apexcharts'
import './styles.css'
const ApexChart = () => {
const [state, setState] = React.useState({
series: [
{
name: 'Activity Score',
data: [20, 100, 40, 30, 50, 80, 33],
},
],
options: {
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 ''
}
},
},
},
},
})
return (
<div>
<div id="chart">
<ReactApexChart
options={state.options}
series={state.series}
type="radar"
height={350}
/>
</div>
</div>
)
}
export default ApexChart