// src/MyCharts.js import React from 'react'; import { Line } from 'react-chartjs-2'; import { Doughnut } from 'react-chartjs-2'; import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend, ArcElement } from 'chart.js'; import '../style/MemberActivity.css'; import { Box, List, ListItem, ListItemText, Typography, Divider, } from "@mui/material"; import { CircularProgressbar, buildStyles } from "react-circular-progressbar"; import "react-circular-progressbar/dist/styles.css"; // Register Chart.js components ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend, ArcElement); const MyCharts = () => { const percentage = 45; // Level Chart (Line Chart) Data const levelData = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ { label: 'Level Progress', data: [20, 40, 60, 80, 100, 90, 70], fill: false, borderColor: 'rgb(75, 192, 192)', tension: 0.1, }, ], }; // Circle Chart (Doughnut Chart) Data const circleData = { labels: ['Completed', 'Remaining'], datasets: [ { label: 'Completion', data: [75, 25], backgroundColor: ['rgb(75, 192, 192)', 'rgb(192, 75, 75)'], borderColor: 'rgb(255, 255, 255)', borderWidth: 1, }, ], }; // Performance Chart (Bar Chart) Data // const performanceData = { // labels: ['Q1', 'Q2', 'Q3', 'Q4'], // datasets: [ // { // label: 'Performance', // data: [50, 70, 90, 60], // backgroundColor: 'rgb(75, 192, 192)', // borderColor: 'rgb(0, 123, 255)', // borderWidth: 1, // }, // ], // }; // Chart Options const options = { responsive: true, plugins: { legend: { position: 'top', }, }, }; return (

Level Chart

Circle Chart

Performance Chart

{/* */} {/* Sidebar Menu */} {[ "Settings", "Subscription", "Auto Renewal", "Achievements", "Logout", ].map((text, index) => ( {index === 3 && } {/* Divider after "Achievements" */} ))} {/* Active User Section */} Active User {`${percentage}%`}
); }; export default MyCharts;