Compact layout and Dashboard layout needed
See original GitHub issueProblem
The default layout takes up a lot of screen space. So it’s difficult to make an app that can be contained in a window, i.e. that does not need scrolling. And a dashboard with multiple widgets and plots is impossible.
Solution
Some kind of “compact” theme or better opportunities to control the layout including some kind og grid layout and opportunities to size the selectboxes, sliders etc.
Additional context
The below python code takes up the full height of my laptop screen. So that’s not very good. But imagine I wanted to create a dashboard with multiple chart and widgets.
import pandas as pd
import streamlit as st
import plotly.express as px
data = {"x": [1, 2, 3, 4], "y": [2, 4, 6, 8]}
st.selectbox("Select x", options=["A", "B"])
st.selectbox("Select y", options=["A", "B"])
dataframe = pd.DataFrame(data)
fig = px.scatter(dataframe, x="x", y="x", title="Plot 1", height=400)
st.plotly_chart(fig, height=400)
st.slider("Select min and max", min_value=1, max_value=10, value=[1, 4])
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to configure Card Compact Layout | Standard Dashboards
Go to "Layout" section of card properties at the right sidebar. Select Compact Layout and click on link "create" ("edit", if card already...
Read more >Compact Layout Limitations and Considerations
Compact layouts aren't assigned to profiles or individual users. To display different sets of fields in records by use case or role, create...
Read more >Compact Layout Design Guidelines - Nimble AMS Help
Compact Layout Design Guidelines provide standards for when to create new compact layouts, how to name them, and how to organize fields.
Read more >Dashboard layouts - Help Center - AskCody
Compact layout As this layout displays the time, subject, location, and organizer of the event, this layout is suitable to use when there...
Read more >How to Customize Headers aka Compact Layouts - YouTube
After watching this screencast the user will be able to locate and customize the headers in Salesforce.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @tvst (and everybody else)
Inspiration for what the basic requirements for layout in streamlit could be can be found here https://ipywidgets.readthedocs.io/en/latest/examples/Layout Templates.html.
The AppLayout and GridLayout is really the basics of what we need (I think).
The AppLayout could maybe be implemented something like
and the GridLayout something like
Any comments suggestions are very much appreciated.
I know one solution here is to put the widgets in the sidebar. But you don’t always wan’t to do that.