Summary
Width and Height changes based on the color option. Color is from the drop down menu. Any idea how to fix it
Steps to reproduce
Code snippet:
import streamlit as st
import pandas as pd
import plotly.express as px
df = pd.read_csv("social_capital.csv")
option = st.selectbox(
'How would you like to be contacted?',
(df.columns.values[2:])
)
chartChoropleth = px.choropleth(data_frame=df,
locations='STATE',
locationmode="USA-states",
scope="usa",
height=600,
width = 600,
color=option,
animation_frame='YEAR')
st.plotly_chart(chartChoropleth)
st.markdown("""---""")
st.write(df)
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
Map size should not change
Actual behavior:
Map changes when new value is passed to choropleth
Debug info
- Streamlit version: (get it with
$ streamlit version
) - Python version: (get it with
$ python --version
) - Using Conda? PipEnv? PyEnv? Pex?
- OS version:
- Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
- Link to your GitHub repo: GitHub - premkumarkora/birthrates
- Link to your deployed app: https://premkumarkora-birthrates-social-capital-k04fax.streamlitapp.com/
Additional information
If needed, add any other context about the problem here.