Spaces:
Sleeping
Sleeping
css
Browse files- app.py +2 -2
- assets/style.css +2 -2
- src/ui/plots/utils.py +3 -3
app.py
CHANGED
|
@@ -85,9 +85,9 @@ def main():
|
|
| 85 |
|
| 86 |
# Set page layout based on current page
|
| 87 |
if current_page == "overview":
|
| 88 |
-
layout = "wide"
|
| 89 |
else:
|
| 90 |
-
layout = "centered"
|
| 91 |
|
| 92 |
# Configure page with appropriate layout
|
| 93 |
st.set_page_config(
|
|
|
|
| 85 |
|
| 86 |
# Set page layout based on current page
|
| 87 |
if current_page == "overview":
|
| 88 |
+
layout = "wide"
|
| 89 |
else:
|
| 90 |
+
layout = "centered"
|
| 91 |
|
| 92 |
# Configure page with appropriate layout
|
| 93 |
st.set_page_config(
|
assets/style.css
CHANGED
|
@@ -144,7 +144,7 @@ section[data-testid="stSidebar"] {
|
|
| 144 |
} */
|
| 145 |
|
| 146 |
/* Constrain wide layout to 85% for visualization pages */
|
| 147 |
-
|
| 148 |
max-width: 75% !important;
|
| 149 |
margin: 0 auto !important;
|
| 150 |
-
}
|
|
|
|
| 144 |
} */
|
| 145 |
|
| 146 |
/* Constrain wide layout to 85% for visualization pages */
|
| 147 |
+
div[data-testid="stMainBlockContainer"] {
|
| 148 |
max-width: 75% !important;
|
| 149 |
margin: 0 auto !important;
|
| 150 |
+
}
|
src/ui/plots/utils.py
CHANGED
|
@@ -71,7 +71,7 @@ def display_plot_with_download(fig, plot_name: str = "plot", help_text: str = No
|
|
| 71 |
)
|
| 72 |
|
| 73 |
# Display the plot
|
| 74 |
-
st.pyplot(fig, use_container_width=
|
| 75 |
|
| 76 |
def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str = None):
|
| 77 |
"""
|
|
@@ -88,7 +88,7 @@ def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str =
|
|
| 88 |
# Use a unique key to prevent redraws and add config to disable animations for faster rendering
|
| 89 |
st.plotly_chart(
|
| 90 |
fig,
|
| 91 |
-
use_container_width=
|
| 92 |
key=f"plotly_{plot_name}_{id(fig)}",
|
| 93 |
config={"displayModeBar": False, "responsive": True, "staticPlot": False}
|
| 94 |
)
|
|
@@ -256,7 +256,7 @@ def display_interactive_spatial_plot(adata, color_key="domain", spot_size = 6, p
|
|
| 256 |
|
| 257 |
plot_event = st.plotly_chart(
|
| 258 |
fig,
|
| 259 |
-
use_container_width=
|
| 260 |
config={'scrollZoom': True},
|
| 261 |
key=plot_name,
|
| 262 |
on_select="rerun"
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
# Display the plot
|
| 74 |
+
st.pyplot(fig, use_container_width=False)
|
| 75 |
|
| 76 |
def display_plotly_with_download(fig, plot_name: str = "plot", help_text: str = None):
|
| 77 |
"""
|
|
|
|
| 88 |
# Use a unique key to prevent redraws and add config to disable animations for faster rendering
|
| 89 |
st.plotly_chart(
|
| 90 |
fig,
|
| 91 |
+
use_container_width=False,
|
| 92 |
key=f"plotly_{plot_name}_{id(fig)}",
|
| 93 |
config={"displayModeBar": False, "responsive": True, "staticPlot": False}
|
| 94 |
)
|
|
|
|
| 256 |
|
| 257 |
plot_event = st.plotly_chart(
|
| 258 |
fig,
|
| 259 |
+
use_container_width=False,
|
| 260 |
config={'scrollZoom': True},
|
| 261 |
key=plot_name,
|
| 262 |
on_select="rerun"
|