6
This commit is contained in:
parent
638e0fe130
commit
35c8cc2fd5
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
*/node_modules/
|
*/node_modules/
|
||||||
*/build/
|
*/build/
|
||||||
|
|
||||||
|
**/node_modules/
|
||||||
|
**/build/
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
File diff suppressed because one or more lines are too long
35
frontend/src/components/ChartLineSample/BarChartStats.tsx
Normal file
35
frontend/src/components/ChartLineSample/BarChartStats.tsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import {
|
||||||
|
ResponsiveContainer,
|
||||||
|
BarChart,
|
||||||
|
CartesianGrid,
|
||||||
|
XAxis,
|
||||||
|
YAxis,
|
||||||
|
Tooltip,
|
||||||
|
Legend,
|
||||||
|
Bar,
|
||||||
|
} from 'recharts';
|
||||||
|
|
||||||
|
interface BarChartStatsProps {
|
||||||
|
data: { name: string; value: number }[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const BarChartStats: React.FC<BarChartStatsProps> = ({ data }) => {
|
||||||
|
return (
|
||||||
|
<div className="bg-white shadow rounded p-4">
|
||||||
|
<h3 className="text-lg font-semibold mb-2 text-gray-700">Overview Chart</h3>
|
||||||
|
<ResponsiveContainer width="100%" height={250}>
|
||||||
|
<BarChart data={data} margin={{ top: 20, right: 30, left: 20, bottom: 5 }}>
|
||||||
|
<CartesianGrid strokeDasharray="3 3" />
|
||||||
|
<XAxis dataKey="name" tick={{ fontSize: 12 }} />
|
||||||
|
<YAxis />
|
||||||
|
<Tooltip />
|
||||||
|
<Legend />
|
||||||
|
<Bar dataKey="value" name="Count" fill="#3182ce" />
|
||||||
|
</BarChart>
|
||||||
|
</ResponsiveContainer>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BarChartStats;
|
||||||
Loading…
x
Reference in New Issue
Block a user