generated from plutack/nextjsauth-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.tsx
77 lines (75 loc) · 1.57 KB
/
overview.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
'use client';
import { Bar, BarChart, ResponsiveContainer, XAxis, YAxis } from 'recharts';
const data = [
{
name: 'Jan',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Feb',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Mar',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Apr',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'May',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Jun',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Jul',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Aug',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Sep',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Oct',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Nov',
total: Math.floor(Math.random() * 5000) + 1000
},
{
name: 'Dec',
total: Math.floor(Math.random() * 5000) + 1000
}
];
export function Overview() {
return (
<ResponsiveContainer width="100%" height={350}>
<BarChart data={data}>
<XAxis
dataKey="name"
stroke="#888888"
fontSize={12}
tickLine={false}
axisLine={false}
/>
<YAxis
stroke="#888888"
fontSize={12}
tickLine={false}
axisLine={false}
tickFormatter={(value) => `$${value}`}
/>
<Bar dataKey="total" fill="#adfa1d" radius={[4, 4, 0, 0]} />
</BarChart>
</ResponsiveContainer>
);
}