Skip to content

[Feature]: Add more proper Content in About page #4000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 200 additions & 0 deletions src/components/Aboutpage/chart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
import React from 'react';
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Cell, Legend, ResponsiveContainer } from 'recharts';

const data = [
{ name: 'Community', team: 80 },
{ name: 'Courses', team: 78 },
{ name: 'Tutorials', team: 70 },
{ name: 'Problems', team: 67 },
{ name: 'Solutions', team: 65 }
];

const colors = [
'rgba(239,216,29,0.9)',
'rgba(49,105,148,0.9)',
'rgba(234,140,16,0.9)',
'rgba(42,1,100,0.9)',
'rgba(115,119,173,0.9)'
];

const CustomTooltip = ({ active, payload, label }) => {
if (active && payload && payload.length) {
return (
<div className="custom-tooltip">
<p className="label" style={{ fontWeight: "600", fontFamily: "monospace", fontSize: "0.9rem", color: "rgb(51, 212, 91)" }}>{label}</p>
</div>
);
}
return null;
};

const Community: React.FC = () => {
return (
<ResponsiveContainer width="100%" height={120}>
<BarChart
data={[{name: 'Community', Community: 80}]}
layout="vertical"
margin={{
top: 20,
right: 5,
left: 30,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis type="number" />
<YAxis dataKey="name" type="category" />
<Tooltip contentStyle={{ backgroundColor: 'black', color: 'white' }}
itemStyle={{ color: colors[0] }} />
<Legend />
<Bar dataKey="Community" fill="rgba(239,216,29,0.9)">
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[index]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
);
};

const Courses: React.FC = () => {
return (
<ResponsiveContainer width="100%" height={120}>
<BarChart
data={[{name: 'Courses', Courses: 78}]}
layout="vertical"
margin={{
top: 20,
right: 5,
left: 30,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis type="number" />
<YAxis dataKey="name" type="category" />
<Tooltip contentStyle={{ backgroundColor: 'black', color: 'white' }}
itemStyle={{ color: colors[1] }} />
<Legend />
<Bar dataKey="Courses" fill={colors[1]}>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[1]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
);
};

const Tutorials: React.FC = () => {
return (
<ResponsiveContainer width="100%" height={120}>
<BarChart
data={[{name: 'Tutorials', Tutorials: 70}]}
layout="vertical"
margin={{
top: 20,
right: 5,
left: 30,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis type="number" />
<YAxis dataKey="name" type="category" />
<Tooltip contentStyle={{ backgroundColor: 'black', color: 'white' }}
itemStyle={{ color: colors[2] }} />
<Legend />
<Bar dataKey="Tutorials" fill={colors[2]}>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[2]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
);
};
const Problems: React.FC = () => {
return (
<ResponsiveContainer width="100%" height={120}>
<BarChart
data={[{name: 'Problems', Problems: 67}]}
layout="vertical"
margin={{
top: 20,
right: 5,
left: 30,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis type="number" />
<YAxis dataKey="name" type="category" />
<Tooltip contentStyle={{ backgroundColor: 'black', color: 'white' }}
itemStyle={{ color: colors[3] }} />
<Legend />
<Bar dataKey="Problems" fill={colors[3]}>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[3]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
);
};
const Solutions: React.FC = () => {
return (
<ResponsiveContainer width="100%" height={120}>
<BarChart
data={[{name: 'Solutions', Solutions: 65}]}
layout="vertical"
margin={{
top: 20,
right: 5,
left: 30,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis type="number" />
<YAxis dataKey="name" type="category" />
<Tooltip contentStyle={{ backgroundColor: 'black', color: 'white' }}
itemStyle={{ color: colors[4] }} />
<Legend />
<Bar dataKey="Solutions" fill={colors[4]}>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[4]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
);
};
const Chart: React.FC = () => {
return (
<>
<h2 style={{margin:"1rem",color:"transparent"}}>Join our Dynamic team to learn and success of our .</h2>
<ResponsiveContainer width="100%" height={400}>
<BarChart
data={data}
margin={{
top: 20, right: 30, left: 20, bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="name" />
<YAxis />
<Tooltip content={<CustomTooltip />} />
<Legend />
<Bar dataKey="team" fill='rgb(51, 212, 91)'>
{data.map((entry, index) => (
<Cell key={`cell-${index}`} fill={colors[index]} />
))}
</Bar>
</BarChart>
</ResponsiveContainer>
</>
);
};

export { Chart,Community,Courses,Tutorials,Problems,Solutions};
Loading
Loading