Skip to content

Commit da26e97

Browse files
fix[frontend](adversary): added sankey auto dimension handler to avoud extremelly grouped data
1 parent 9a27012 commit da26e97

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

frontend/src/features/adversaries/components/adversaries-sankey.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ export function AdversariesSankey({ data }: { data: AdversaryResponse[] }) {
168168
]
169169

170170
return (
171-
<div className="flex h-full w-full flex-col rounded-xl border border-border bg-card p-3">
171+
<div
172+
style={{
173+
height:`${Math.min(Math.max(data.length,50)*1.7,500)}%`
174+
}}
175+
className={`flex w-full flex-col rounded-xl border border-border bg-card p-3`}>
172176
<div className="grid grid-cols-3 gap-2 pb-2 text-xs font-medium">
173177
{headers.map((h, i) => (
174178
<div

0 commit comments

Comments
 (0)