Skip to content

added set height to graph #52

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 16 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 13 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
97 changes: 41 additions & 56 deletions components/ui/bankcomponents/accounttrends.tsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,43 @@
import { ResponsiveContainer, AreaChart, CartesianGrid, XAxis, YAxis, Tooltip, Area } from "recharts";
import {
ResponsiveContainer,
AreaChart,
CartesianGrid,
XAxis,
YAxis,
Tooltip,
Area,
} from "recharts";

export function AccountTrends({ data }) {
return (
<div
className={`flex flex-col p-10 shadow-xl w-full h-[408px] bg-white justify-center sm:col-span-1 lg:col-span-2 `}
>
<p className="aiinsightstext pt-4">6-Month Account Trend</p>
<ResponsiveContainer className={"h-full"}>
<AreaChart
data={data}
margin={{
top: 20,
right: 30,
left: 0,
bottom: 10,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Area type="monotone" dataKey="balance" stroke="#8884d8" fill="url(#colorUv)" />

export function AccountTrends({data}) {


return (

<div className={`flex flex-col p-10 shadow-xl w-full h-[425px] lg:h-[425px] xl:h-[425px] bg-white justify-center sm:col-span-1 lg:col-span-2 `}>
<p className="aiinsightstext pt-4">
6-Month Account Trend
</p>
<ResponsiveContainer className={"h-full"}>
<AreaChart
data={data}
margin={{
top: 20,
right: 30,
left: 0,
bottom: 10,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="month" />
<YAxis />
<Tooltip />
<Area
type="monotone"
dataKey="balance"
stroke="#8884d8"
fill="url(#colorUv)"
/>

<defs>
<linearGradient
id="colorUv"
x1="0"
y1="0"
x2="0"
y2="1"
>
<stop
offset="5%"
stopColor="#00c0e7"
stopOpacity={1}
/>
<stop
offset="95%"
stopColor="#a34fde"
stopOpacity={1}
/>
</linearGradient>
</defs>
</AreaChart>
</ResponsiveContainer>
</div>
)
}
<defs>
<linearGradient id="colorUv" x1="0" y1="0" x2="0" y2="1">
<stop offset="5%" stopColor="#00c0e7" stopOpacity={1} />
<stop offset="95%" stopColor="#a34fde" stopOpacity={1} />
</linearGradient>
</defs>
</AreaChart>
</ResponsiveContainer>
</div>
);
}
Loading