first commit
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
import React, { Component } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
class TaskDistributionChart extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
series: [14, 23, 21, 17],
|
||||
options: {
|
||||
labels: ['API', 'Frontend', 'Backend', 'Design'],
|
||||
colors: ["#B8C8DB", "#A1AADB", "#BA68C8", "#8E72C8"],
|
||||
fill: {
|
||||
opacity: 0.9,
|
||||
},
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 480,
|
||||
options: {
|
||||
chart: {
|
||||
width: 200,
|
||||
},
|
||||
legend: {
|
||||
position: "bottom",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series}
|
||||
height="390"
|
||||
type="polarArea"
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaskDistributionChart;
|
||||
@@ -0,0 +1,75 @@
|
||||
import React from "react";
|
||||
import { Box } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
import InputLabel from "@mui/material/InputLabel";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import FormControl from "@mui/material/FormControl";
|
||||
import Select from "@mui/material/Select";
|
||||
import TaskDistributionChart from "./TaskDistributionChart";
|
||||
|
||||
const TaskDistribution = () => {
|
||||
const [select, setSelect] = React.useState("");
|
||||
const handleChange = (event) => {
|
||||
setSelect(event.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
marginBottom: "15px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Task Distribution
|
||||
</Typography>
|
||||
<Box>
|
||||
<FormControl sx={{ minWidth: 120 }} size="small">
|
||||
<InputLabel id="demo-select-small" sx={{ fontSize: '14px' }}>Select</InputLabel>
|
||||
<Select
|
||||
labelId="demo-select-small"
|
||||
id="demo-select-small"
|
||||
value={select}
|
||||
label="Select"
|
||||
onChange={handleChange}
|
||||
sx={{ fontSize: '14px' }}
|
||||
>
|
||||
<MenuItem value={0} sx={{ fontSize: '14px' }}>Today</MenuItem>
|
||||
<MenuItem value={1} sx={{ fontSize: '14px' }}>Last 7 Days</MenuItem>
|
||||
<MenuItem value={2} sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem value={3} sx={{ fontSize: '14px' }}>Last 12 Months</MenuItem>
|
||||
<MenuItem value={4} sx={{ fontSize: '14px' }}>All Time</MenuItem>
|
||||
</Select>
|
||||
</FormControl>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* TaskDistributionChart */}
|
||||
<TaskDistributionChart />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TaskDistribution;
|
||||
Reference in New Issue
Block a user