Skip to content

Commit

Permalink
Merge pull request #172 from kushwahramkumar2003/ram
Browse files Browse the repository at this point in the history
pie chart added
  • Loading branch information
kushwahramkumar2003 authored Feb 27, 2024
2 parents 67ef06d + 2e43cc0 commit 6fa4ca0
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 3 deletions.
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.6.2",
"chart.js": "^4.4.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"concurrently": "^8.2.2",
Expand All @@ -27,6 +28,7 @@
"lucide-react": "^0.331.0",
"process": "^0.11.10",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-easy-crop": "^5.0.4",
"react-hook-form": "^7.48.2",
Expand Down
1 change: 0 additions & 1 deletion src/pages/user/header/NavLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { RxDashboard } from "react-icons/rx";
import { CgProfile } from "react-icons/cg";
import { MdQuiz } from "react-icons/md";
Expand Down
29 changes: 28 additions & 1 deletion src/pages/user/screens/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
import { Pie } from "react-chartjs-2";

const data = {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [
{
label: "# of Votes",
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(255, 206, 86, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(255, 159, 64, 0.2)",
],
borderColor: [
"rgba(255, 99, 132, 1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)",
],
borderWidth: 1,
},
],
};

const Dashboard = () => {
return (
<div className="flex items-center justify-center text-xl font-semibold text-center opacity-60">
Dashboard to be implemented
<Pie data={data} />
</div>
);
};
Expand Down
6 changes: 5 additions & 1 deletion src/pages/user/screens/result/Result.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import {useQuery} from "@tanstack/react-query";


const Result = () => {
const {data ,isPending} = useQuery(

);
return (
<div className="flex items-center justify-center text-xl font-semibold text-center opacity-60">
To be implemented Result

</div>
);
};
Expand Down

0 comments on commit 6fa4ca0

Please sign in to comment.