Summary
Hi!
The Altair chart height cannot fit properly within the column, and the coordinates are cut off.
I have tried to adjust figure size via Altair library,but still faild.
Here is my code.
Code snippet:
ho_data = pd.melt(flight_df.T.fillna(
0).reset_index(), id_vars=["index"])
chart = (
alt.Chart(ho_data)
.mark_bar()
.encode(
x=alt.X("value", type="quantitative", title=""),
y=alt.Y("index", type="nominal", title=""),
color=alt.Color("variable", type="nominal", title=""),
order=alt.Order("variable", sort="descending"),
)
.properties(
# width='container',
height=450
))
st.altair_chart(chart, use_container_width=True, theme='streamlit')
Expected behavior:
coordinates shouldn’t be cut off when the figure height changed.
I wonder know how can I “fit” the custom Altair figure size in a column(especially changed height)
Thank you!