import React from 'react'
import ReactApexChart from 'react-apexcharts'
import './styles.css'
const ApexChart = () => {
const [state, setState] = React.useState({
series: [12, 8, 15, 23, 18, 9, 6, 11],
options: {
chart: {
type: 'polarArea',
},
labels: ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'],
title: {
text: 'Wind Frequency by Direction (%)',
align: 'center',
},
stroke: {
colors: ['#fff'],
},
fill: {
opacity: 0.8,
},
legend: {
position: 'bottom',
},
responsive: [
{
breakpoint: 480,
options: {
chart: {
width: 200,
},
legend: {
position: 'bottom',
},
},
},
],
},
})
return (
<div>
<div id="chart">
<ReactApexChart
options={state.options}
series={state.series}
type="polarArea"
/>
</div>
</div>
)
}
export default ApexChart