You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when using a wide window, the graph component does not take all available parent space, as can be seen here (the bottom node is truncated on its right):
I nested two st.container with borders to show that they expand to take all space provided by their parent, while agraph does not.
Here is the code to reproduce this:
importstreamlitasstfromstreamlit_agraphimportagraph, Node, Edge, Config# Use the full page instead of a narrow central columnst.set_page_config(layout="wide")
top_container=st.container(border=True)
withtop_container:
graph_container=st.container(border=True)
withgraph_container:
nodes= []
edges= []
nodes.append( Node(id="Spiderman",
label="Peter Parker",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargsnodes.append( Node(id="Captain_Marvel",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
edges.append( Edge(source="Captain_Marvel",
label="friend_of",
target="Spiderman",
# **kwargs
)
)
config=Config(#width=750,#height=950,directed=True,
physics=False,
hierarchical=False,
# **kwargs
)
return_value=agraph(nodes=nodes,
edges=edges,
config=config)
Looking at Config's code, I can see that width and height have default values, so this would explain the current behavior.
Expectation: get an "expand in parent" behavior when width and height are not specified.
The text was updated successfully, but these errors were encountered:
Hi, when using a wide window, the graph component does not take all available parent space, as can be seen here (the bottom node is truncated on its right):
I nested two
st.container
with borders to show that they expand to take all space provided by their parent, whileagraph
does not.Here is the code to reproduce this:
Looking at
Config
's code, I can see thatwidth
andheight
have default values, so this would explain the current behavior.Expectation: get an "expand in parent" behavior when
width
andheight
are not specified.The text was updated successfully, but these errors were encountered: