-
I'm using a GraphCanvas component within a parent container, and I'm facing difficulties in controlling the size of the GraphCanvas. I want to either specify relative (percentage-based) or absolute (fixed pixel) width and height for the GraphCanvas. Currently, it takes up the entire window's space, and it even overlaps my side menu, and my attempts to apply CSS rules to the canvas element have not been successful. Here's how I'm trying to set the size: <div style={{ width: '50%', height: '50%' }}>
<GraphCanvas nodes={nodes} edges={edges} />
</div> I'm looking for a solution or guidance on how to make the GraphCanvas either match the size of its parent node or specify its width and height effectively via props maybe ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi, you can manipulation by DOM to get the className, set height and position you want. |
Beta Was this translation helpful? Give feedback.
-
make position relative for parent div
|
Beta Was this translation helpful? Give feedback.
I was able to fix it by using fixed position