import React from 'react'
import ReactApexChart from 'react-apexcharts'
import './styles.css'
const ApexChart = () => {
const [state, setState] = React.useState({
series: [
{
name: 'Platform',
data: [
{
x: 'Q1',
y: 43,
},
{
x: 'Q2',
y: 58,
},
],
},
{
name: 'Mobile',
data: [
{
x: 'Q1',
y: 33,
},
{
x: 'Q2',
y: 38,
},
],
},
{
name: 'Web',
data: [
{
x: 'Q1',
y: 55,
},
{
x: 'Q2',
y: 21,
},
],
},
],
options: {
chart: {
height: 350,
width: 400,
type: 'line',
},
plotOptions: {
line: {
isSlopeChart: true,
},
},
title: {
text: 'Sprint Velocity: Q1 to Q2',
},
},
})
return (
<div>
<div id="chart">
<ReactApexChart
options={state.options}
series={state.series}
type="line"
height={350}
width={400}
/>
</div>
</div>
)
}
export default ApexChart