pygwalker
pygwalker copied to clipboard
[DEV-759] [BUG] pygwalker visualization size not rendered correctly in streamlit app
Original bug report: https://toriaezuugoku.com/pygwalker-2/
Windows10 streamlit==1.27.0 pygwalker==0.4.7
It seems pygwalker does not rendered with correct size so the charts in the article only shows legend parts.
related code with bug
https://github.com/Kanaries/pygwalker/blob/ac6c12dbadf85ac03e4e36e35c130351be3689fa/pygwalker/api/streamlit.py#L223
This is because when the size of graphic-walker is auto, pygwalker does not correctly give the streamlit iframe a correct width and height.
chart_size_config["mode"] = "fixed"
The above code is for pygwalker to render the graphic-walker chart according to the width and height passed in by the user.
Progress update:
Identified problems,
- pygwalker changed users's size mode settings which it shouldn't
- pygwalker for now does not implement streamlit components in a offical way, which make it a liitle bit hard to set the iframe container size correctly.
Actions:
- [ ] Formally refactor pygwalker in streamlit api to the recommended implementation.