New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError if there is no ggsize #7
Comments
I am not sure why but now I am not able to get it working again but get instead another error: If I remove the ggsize again it throws the KeyError first. |
Thanks for letting me know @schakalakka! I'm only using the default HTML generating method from LetsPlot, but maybe I have a version compatibility issue of some sort |
I think I see the issue here, I'm assuming too much from the library in terms of base data. I'll add a default, so that if ggsize isn't provided then it will default to something. |
Hi @randyzwitch ! I'm not familiar with the specifics of streamlit but nevertheless would like to share an info on one hidden feature of lets-plot related to the plot size: If you define a data attribute "letsPlotPreferredWidth" (i.e. I hope that might make easier for you to manage lets-pot size in streamlit apps. |
If I have a plot without ggsize like
lp.ggplot(df, lp.aes(x='foo, y='bar')) + lp.geom_bar()
then streamlit_letsplot throws anKeyError: 'ggsize'
with a throwsback toFile "C:\ProgramData\Anaconda3\envs\efleets39\lib\site-packages\streamlit_letsplot\__init__.py", line 24, in st_letsplot height=plot_dict["ggsize"]["height"]
Solution:
Adding lp.ggsize(500, 250) to the plot works.
The text was updated successfully, but these errors were encountered: