first commit
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
import React from "react";
|
||||
import Card from "@mui/material/Card";
|
||||
import { Typography } from "@mui/material";
|
||||
import {
|
||||
Radar,
|
||||
RadarChart,
|
||||
PolarGrid,
|
||||
PolarAngleAxis,
|
||||
PolarRadiusAxis,
|
||||
ResponsiveContainer,
|
||||
} from "recharts";
|
||||
|
||||
const data = [
|
||||
{
|
||||
subject: "Math",
|
||||
A: 120,
|
||||
B: 110,
|
||||
fullMark: 150,
|
||||
},
|
||||
{
|
||||
subject: "Chinese",
|
||||
A: 98,
|
||||
B: 130,
|
||||
fullMark: 150,
|
||||
},
|
||||
{
|
||||
subject: "English",
|
||||
A: 86,
|
||||
B: 130,
|
||||
fullMark: 150,
|
||||
},
|
||||
{
|
||||
subject: "Geography",
|
||||
A: 99,
|
||||
B: 100,
|
||||
fullMark: 150,
|
||||
},
|
||||
{
|
||||
subject: "Physics",
|
||||
A: 85,
|
||||
B: 90,
|
||||
fullMark: 150,
|
||||
},
|
||||
{
|
||||
subject: "History",
|
||||
A: 65,
|
||||
B: 85,
|
||||
fullMark: 150,
|
||||
},
|
||||
];
|
||||
|
||||
const SimpleRadarChart = () => {
|
||||
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"
|
||||
>
|
||||
Simple Radar Chart
|
||||
</Typography>
|
||||
|
||||
<ResponsiveContainer width="100%" aspect={2.0 / 0.9}>
|
||||
<RadarChart cx="50%" cy="50%" outerRadius="80%" data={data}>
|
||||
<PolarGrid />
|
||||
<PolarAngleAxis dataKey="subject" />
|
||||
<PolarRadiusAxis />
|
||||
<Radar
|
||||
name="Mike"
|
||||
dataKey="A"
|
||||
stroke="#8884d8"
|
||||
fill="#8884d8"
|
||||
fillOpacity={0.6}
|
||||
/>
|
||||
</RadarChart>
|
||||
</ResponsiveContainer>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SimpleRadarChart;
|
||||
Reference in New Issue
Block a user