11import { useSimContext } from "@/contexts/SimContext/context" ;
22import { FC , useMemo } from "react" ;
3- import { Area , AreaChart , Tooltip , XAxis , YAxis } from "recharts" ;
3+ import { Area , AreaChart , ResponsiveContainer , Tooltip , XAxis , YAxis } from "recharts" ;
44
55export const TransactionsView : FC = ( { } ) => {
66 const {
@@ -28,15 +28,17 @@ export const TransactionsView: FC = ({ }) => {
2828 return (
2929 < div className = "flex flex-col w-full h-4/5 items-center justify-center" >
3030 < h2 className = "font-bold text-xl" > Transactions</ h2 >
31- < AreaChart width = { 640 } height = { 480 } data = { data } >
32- < XAxis dataKey = "Time" />
33- < YAxis />
34- < Tooltip />
35- < Area type = "monotone" dataKey = "Created" stackId = "1" stroke = "#26de81" fill = "#26de81" />
36- < Area type = "monotone" dataKey = "In Input Block" stackId = "1" stroke = "#2bcbba" fill = "#2bcbba" />
37- < Area type = "monotone" dataKey = "In Endorser Block" stackId = "1" stroke = "#4b7bec" fill = "#4b7bec" />
38- < Area type = "monotone" dataKey = "On Chain" stackId = "1" stroke = "#2d98da" fill = "#2d98da" />
39- </ AreaChart >
31+ < ResponsiveContainer width = "80%" height = "80%" >
32+ < AreaChart data = { data } >
33+ < XAxis dataKey = "Time" />
34+ < YAxis />
35+ < Tooltip />
36+ < Area type = "monotone" dataKey = "Created" stackId = "1" stroke = "#9e0142" fill = "#9e0142" />
37+ < Area type = "monotone" dataKey = "In Input Block" stackId = "1" stroke = "#d0394e" fill = "#d0394e" />
38+ < Area type = "monotone" dataKey = "In Endorser Block" stackId = "1" stroke = "#ef6445" fill = "#ef6445" />
39+ < Area type = "monotone" dataKey = "On Chain" stackId = "1" stroke = "#fb9d56" fill = "#fb9d56" />
40+ </ AreaChart >
41+ </ ResponsiveContainer >
4042 </ div >
4143 ) ;
4244}
0 commit comments