first commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
import React from "react";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
import { PieChart, Pie, Tooltip, ResponsiveContainer } from 'recharts';
|
||||
|
||||
const data01 = [
|
||||
{ name: 'Group A', value: 400 },
|
||||
{ name: 'Group B', value: 300 },
|
||||
{ name: 'Group C', value: 300 },
|
||||
{ name: 'Group D', value: 200 },
|
||||
{ name: 'Group E', value: 278 },
|
||||
{ name: 'Group F', value: 189 },
|
||||
];
|
||||
|
||||
const data02 = [
|
||||
{ name: 'Group A', value: 2400 },
|
||||
{ name: 'Group B', value: 4567 },
|
||||
{ name: 'Group C', value: 1398 },
|
||||
{ name: 'Group D', value: 9800 },
|
||||
{ name: 'Group E', value: 3908 },
|
||||
{ name: 'Group F', value: 4800 },
|
||||
];
|
||||
|
||||
const TwoSimplePieChart = () => {
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "5px",
|
||||
mb: "15px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
Two Simple Pie Chart
|
||||
</Typography>
|
||||
|
||||
<ResponsiveContainer width="100%" aspect={2.0 / 0.9}>
|
||||
<PieChart width={400} height={400}>
|
||||
<Pie
|
||||
dataKey="value"
|
||||
isAnimationActive={false}
|
||||
data={data01}
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
outerRadius={80}
|
||||
fill="#8884d8"
|
||||
label
|
||||
/>
|
||||
<Pie dataKey="value" data={data02} cx={500} cy={200} innerRadius={40} outerRadius={80} fill="#82ca9d" />
|
||||
<Tooltip />
|
||||
</PieChart>
|
||||
</ResponsiveContainer>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TwoSimplePieChart;
|
||||
Reference in New Issue
Block a user