Skip to content

Commit

Permalink
Merge pull request optuna#624 from moririn2528/fix-graph
Browse files Browse the repository at this point in the history
fit figure to node size on preference graph page
  • Loading branch information
contramundum53 authored Sep 22, 2023
2 parents ae11fda + 7e06672 commit 4d03688
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions optuna_dashboard/ts/components/ArtifactCardMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export const ArtifactCardMedia: FC<{
height={height}
image={urlPath}
alt={artifact.filename}
style={{
objectFit: "contain",
}}
/>
)
}
Expand Down
10 changes: 9 additions & 1 deletion optuna_dashboard/ts/components/PreferentialGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ const GraphNode: FC<NodeProps<NodeData>> = ({ data, isConnectable }) => {
style={{ background: "#555" }}
isConnectable={isConnectable}
/>
<CardContent>
<CardContent
sx={{
position: "relative",
margin: 0,
padding: theme.spacing(1),
width: nodeWidth,
height: nodeHeight - 72,
}}
>
<PreferentialOutputComponent
trial={trial}
artifact={artifact}
Expand Down

0 comments on commit 4d03688

Please sign in to comment.