App is running locally:
I am currently trying to create a dendogram chart which looks like the below in streamlit
But looks like this in jupyter notebook
(this is of a different dataset but the idea is the whole chart appears)
The right side of the chart is not showing on streamlit but is doing so in jupyter notebook.
Is there a way to rectify this?
The data:
data = [
{
"index": "HP Regen",
"Akai": 0.6666666666666666
},
{
"index": "Physical Defense",
"Akai": 0.4
},
{
"index": "HP",
"Akai": 0.8666666666666667
},
{
"index": "Magic Defense",
"Akai": 0.4
}
]
import plotly.figure_factory as ff
from scipy.cluster.hierarchy import dendrogram, linkage
df_data = pd.DataFrame(data)
df_data.index = df_data.iloc[:,0]
df_data = df_data.iloc[:,1:]
fig_hier = ff.create_dendrogram(df_data, linkagefun=lambda x: linkage(x, "ward"), orientation='bottom', labels=df_data.index.tolist())
st.plotly_chart(fig_hier, use_container_width=True)