Skip to content

Commit 2b24a49

Browse files
committed
visualizer: fix order of tooltip items
1 parent 34d233a commit 2b24a49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/src/components/Transactions/TransactionsView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ export const TransactionsView: FC = ({ }) => {
2525
})
2626
}, [transactions]);
2727

28+
const tooltipOrderer = ["Created", "In Input Block", "In Endorser Block", "On Chain"];
29+
2830
return (
2931
<div className="flex flex-col w-full h-4/5 items-center justify-center">
3032
<h2 className="font-bold text-xl">Transactions</h2>
3133
<ResponsiveContainer width="80%" height="80%">
3234
<AreaChart data={data}>
3335
<XAxis dataKey="Time" />
3436
<YAxis />
35-
<Tooltip />
37+
<Tooltip itemSorter={i => tooltipOrderer.indexOf(i.dataKey as string)} />
3638
<Area type="monotone" dataKey="On Chain" stackId="1" isAnimationActive={false} stroke="#9e0142" fill="#9e0142" />
3739
<Area type="monotone" dataKey="In Endorser Block" stackId="1" isAnimationActive={false} stroke="#d0394e" fill="#d0394e" />
3840
<Area type="monotone" dataKey="In Input Block" stackId="1" isAnimationActive={false} stroke="#ef6445" fill="#ef6445" />

0 commit comments

Comments
 (0)