react-garden
Version:
React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.
87 lines (79 loc) • 2.25 kB
JavaScript
// ** MUI Imports
import Card from '@mui/material/Card'
import { useTheme } from '@mui/material/styles'
import CardHeader from '@mui/material/CardHeader'
import IconButton from '@mui/material/IconButton'
import CardContent from '@mui/material/CardContent'
// ** Icons Imports
import DotsVertical from 'mdi-material-ui/DotsVertical'
// ** Custom Components Imports
import ReactApexcharts from '~/@core/components/react-apexcharts'
const series = [
{
name: 'Income',
data: [70, 90, 90, 90, 80, 90]
},
{
name: 'Net Worth',
data: [120, 80, 100, 80, 100, 80]
}
]
const CardWidgetsPerformance = () => {
// ** Hook
const theme = useTheme()
const options = {
chart: {
parentHeightOffset: 0,
toolbar: { show: false }
},
colors: [theme.palette.primary.main, theme.palette.info.main],
plotOptions: {
radar: {
size: 110,
polygons: {
strokeColors: ['#ebe9f1', 'transparent', 'transparent', 'transparent', 'transparent', 'transparent']
}
}
},
fill: {
type: 'gradient',
gradient: {
shade: 'dark',
gradientToColors: [theme.palette.primary.main, theme.palette.info.main],
shadeIntensity: 1,
type: 'vertical',
opacityFrom: 1,
opacityTo: 0.9,
stops: [0, 100]
}
},
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
markers: {
size: 0
},
xaxis: {
labels: { show: true, style: { fontSize: '14px' } }
},
yaxis: { show: false },
grid: { show: false }
}
return (
<Card>
<CardHeader
title='Performance'
titleTypographyProps={{
sx: { lineHeight: '2rem !important', letterSpacing: '0.15px !important' }
}}
action={
<IconButton size='small' aria-label='settings' className='card-more-options' sx={{ color: 'text.secondary' }}>
<DotsVertical />
</IconButton>
}
/>
<CardContent>
<ReactApexcharts type='radar' height={295} series={series} options={options} />
</CardContent>
</Card>
)
}
export default CardWidgetsPerformance